{"action":"created","comment":{"url":"https://api.github.com/repos/autographdevelopers/autograph-api/pulls/comments/159140321","pull_request_review_id":86047263,"id":159140321,"diff_hunk":"@@ -0,0 +1,47 @@\n+class CreateInvitationService\n+  def initialize(driving_school, invited_user_type, invited_user_params, invited_user_privileges_params)\n+    @driving_school = driving_school\n+    @invited_user_type = invited_user_type\n+    @invited_user_params = invited_user_params\n+    @invited_user_privileges_params = invited_user_privileges_params\n+\n+    @invited_user = User.find_by_email(invited_user_params[:email])\n+\n+    validate_invited_user_type\n+    validate_type_to_match_invited_user\n+  end\n+\n+  def call","path":"app/services/create_invitation_service.rb","position":14,"original_position":14,"commit_id":"895253a08ac1b84faf4e682bdb8433aa1a598f8d","original_commit_id":"895253a08ac1b84faf4e682bdb8433aa1a598f8d","user":{"login":"pospieszynski","id":15077823,"avatar_url":"https://avatars1.githubusercontent.com/u/15077823?v=4","gravatar_id":"","url":"https://api.github.com/users/pospieszynski","html_url":"https://github.com/pospieszynski","followers_url":"https://api.github.com/users/pospieszynski/followers","following_url":"https://api.github.com/users/pospieszynski/following{/other_user}","gists_url":"https://api.github.com/users/pospieszynski/gists{/gist_id}","starred_url":"https://api.github.com/users/pospieszynski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pospieszynski/subscriptions","organizations_url":"https://api.github.com/users/pospieszynski/orgs","repos_url":"https://api.github.com/users/pospieszynski/repos","events_url":"https://api.github.com/users/pospieszynski/events{/privacy}","received_events_url":"https://api.github.com/users/pospieszynski/received_events","type":"User","site_admin":false},"body":"What If I want to invite employee and on his email is already registered students account?","created_at":"2017-12-31T13:33:35Z","updated_at":"2017-12-31T13:33:43Z","html_url":"https://github.com/autographdevelopers/autograph-api/pull/7#discussion_r159140321","pull_request_url":"https://api.github.com/repos/autographdevelopers/autograph-api/pulls/7","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/autographdevelopers/autograph-api/pulls/comments/159140321"},"html":{"href":"https://github.com/autographdevelopers/autograph-api/pull/7#discussion_r159140321"},"pull_request":{"href":"https://api.github.com/repos/autographdevelopers/autograph-api/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/autographdevelopers/autograph-api/pulls/7","id":158794273,"html_url":"https://github.com/autographdevelopers/autograph-api/pull/7","diff_url":"https://github.com/autographdevelopers/autograph-api/pull/7.diff","patch_url":"https://github.com/autographdevelopers/autograph-api/pull/7.patch","issue_url":"https://api.github.com/repos/autographdevelopers/autograph-api/issues/7","number":7,"state":"open","locked":false,"title":"Integrate invitation","user":{"login":"maciekmichalik","id":18310359,"avatar_url":"https://avatars1.githubusercontent.com/u/18310359?v=4","gravatar_id":"","url":"https://api.github.com/users/maciekmichalik","html_url":"https://github.com/maciekmichalik","followers_url":"https://api.github.com/users/maciekmichalik/followers","following_url":"https://api.github.com/users/maciekmichalik/following{/other_user}","gists_url":"https://api.github.com/users/maciekmichalik/gists{/gist_id}","starred_url":"https://api.github.com/users/maciekmichalik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maciekmichalik/subscriptions","organizations_url":"https://api.github.com/users/maciekmichalik/orgs","repos_url":"https://api.github.com/users/maciekmichalik/repos","events_url":"https://api.github.com/users/maciekmichalik/events{/privacy}","received_events_url":"https://api.github.com/users/maciekmichalik/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-12-17T17:04:50Z","updated_at":"2017-12-31T13:33:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5af1e02f95c837d5070400b450a50f48e78da7db","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/autographdevelopers/autograph-api/pulls/7/commits","review_comments_url":"https://api.github.com/repos/autographdevelopers/autograph-api/pulls/7/comments","review_comment_url":"https://api.github.com/repos/autographdevelopers/autograph-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/autographdevelopers/autograph-api/issues/7/comments","statuses_url":"https://api.github.com/repos/autographdevelopers/autograph-api/statuses/895253a08ac1b84faf4e682bdb8433aa1a598f8d","head":{"label":"autographdevelopers:integrate-invitation","ref":"integrate-invitation","sha":"895253a08ac1b84faf4e682bdb8433aa1a598f8d","user":{"login":"autographdevelopers","id":33525941,"avatar_url":"https://avatars2.githubusercontent.com/u/33525941?v=4","gravatar_id":"","url":"https://api.github.com/users/autographdevelopers","html_url":"https://github.com/autographdevelopers","followers_url":"https://api.github.com/users/autographdevelopers/followers","following_url":"https://api.github.com/users/autographdevelopers/following{/other_user}","gists_url":"https://api.github.com/users/autographdevelopers/gists{/gist_id}","starred_url":"https://api.github.com/users/autographdevelopers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/autographdevelopers/subscriptions","organizations_url":"https://api.github.com/users/autographdevelopers/orgs","repos_url":"https://api.github.com/users/autographdevelopers/repos","events_url":"https://api.github.com/users/autographdevelopers/events{/privacy}","received_events_url":"https://api.github.com/users/autographdevelopers/received_events","type":"User","site_admin":false},"repo":{"id":110150062,"name":"autograph-api","full_name":"autographdevelopers/autograph-api","owner":{"login":"autographdevelopers","id":33525941,"avatar_url":"https://avatars2.githubusercontent.com/u/33525941?v=4","gravatar_id":"","url":"https://api.github.com/users/autographdevelopers","html_url":"https://github.com/autographdevelopers","followers_url":"https://api.github.com/users/autographdevelopers/followers","following_url":"https://api.github.com/users/autographdevelopers/following{/other_user}","gists_url":"https://api.github.com/users/autographdevelopers/gists{/gist_id}","starred_url":"https://api.github.com/users/autographdevelopers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/autographdevelopers/subscriptions","organizations_url":"https://api.github.com/users/autographdevelopers/orgs","repos_url":"https://api.github.com/users/autographdevelopers/repos","events_url":"https://api.github.com/users/autographdevelopers/events{/privacy}","received_events_url":"https://api.github.com/users/autographdevelopers/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/autographdevelopers/autograph-api","description":null,"fork":false,"url":"https://api.github.com/repos/autographdevelopers/autograph-api","forks_url":"https://api.github.com/repos/autographdevelopers/autograph-api/forks","keys_url":"https://api.github.com/repos/autographdevelopers/autograph-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/autographdevelopers/autograph-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/autographdevelopers/autograph-api/teams","hooks_url":"https://api.github.com/repos/autographdevelopers/autograph-api/hooks","issue_events_url":"https://api.github.com/repos/autographdevelopers/autograph-api/issues/events{/number}","events_url":"https://api.github.com/repos/autographdevelopers/autograph-api/events","assignees_url":"https://api.github.com/repos/autographdevelopers/autograph-api/assignees{/user}","branches_url":"https://api.github.com/repos/autographdevelopers/autograph-api/branches{/branch}","tags_url":"https://api.github.com/repos/autographdevelopers/autograph-api/tags","blobs_url":"https://api.github.com/repos/autographdevelopers/autograph-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/autographdevelopers/autograph-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/autographdevelopers/autograph-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/autographdevelopers/autograph-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/autographdevelopers/autograph-api/statuses/{sha}","languages_url":"https://api.github.com/repos/autographdevelopers/autograph-api/languages","stargazers_url":"https://api.github.com/repos/autographdevelopers/autograph-api/stargazers","contributors_url":"https://api.github.com/repos/autographdevelopers/autograph-api/contributors","subscribers_url":"https://api.github.com/repos/autographdevelopers/autograph-api/subscribers","subscription_url":"https://api.github.com/repos/autographdevelopers/autograph-api/subscription","commits_url":"https://api.github.com/repos/autographdevelopers/autograph-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/autographdevelopers/autograph-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/autographdevelopers/autograph-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/autographdevelopers/autograph-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/autographdevelopers/autograph-api/contents/{+path}","compare_url":"https://api.github.com/repos/autographdevelopers/autograph-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/autographdevelopers/autograph-api/merges","archive_url":"https://api.github.com/repos/autographdevelopers/autograph-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/autographdevelopers/autograph-api/downloads","issues_url":"https://api.github.com/repos/autographdevelopers/autograph-api/issues{/number}","pulls_url":"https://api.github.com/repos/autographdevelopers/autograph-api/pulls{/number}","milestones_url":"https://api.github.com/repos/autographdevelopers/autograph-api/milestones{/number}","notifications_url":"https://api.github.com/repos/autographdevelopers/autograph-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/autographdevelopers/autograph-api/labels{/name}","releases_url":"https://api.github.com/repos/autographdevelopers/autograph-api/releases{/id}","deployments_url":"https://api.github.com/repos/autographdevelopers/autograph-api/deployments","created_at":"2017-11-09T18:13:13Z","updated_at":"2017-11-09T18:38:09Z","pushed_at":"2017-12-20T20:59:59Z","git_url":"git://github.com/autographdevelopers/autograph-api.git","ssh_url":"git@github.com:autographdevelopers/autograph-api.git","clone_url":"https://github.com/autographdevelopers/autograph-api.git","svn_url":"https://github.com/autographdevelopers/autograph-api","homepage":null,"size":122,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"autographdevelopers:master","ref":"master","sha":"8ab82d33ad9e0fadbfb6b16b00898f236304b712","user":{"login":"autographdevelopers","id":33525941,"avatar_url":"https://avatars2.githubusercontent.com/u/33525941?v=4","gravatar_id":"","url":"https://api.github.com/users/autographdevelopers","html_url":"https://github.com/autographdevelopers","followers_url":"https://api.github.com/users/autographdevelopers/followers","following_url":"https://api.github.com/users/autographdevelopers/following{/other_user}","gists_url":"https://api.github.com/users/autographdevelopers/gists{/gist_id}","starred_url":"https://api.github.com/users/autographdevelopers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/autographdevelopers/subscriptions","organizations_url":"https://api.github.com/users/autographdevelopers/orgs","repos_url":"https://api.github.com/users/autographdevelopers/repos","events_url":"https://api.github.com/users/autographdevelopers/events{/privacy}","received_events_url":"https://api.github.com/users/autographdevelopers/received_events","type":"User","site_admin":false},"repo":{"id":110150062,"name":"autograph-api","full_name":"autographdevelopers/autograph-api","owner":{"login":"autographdevelopers","id":33525941,"avatar_url":"https://avatars2.githubusercontent.com/u/33525941?v=4","gravatar_id":"","url":"https://api.github.com/users/autographdevelopers","html_url":"https://github.com/autographdevelopers","followers_url":"https://api.github.com/users/autographdevelopers/followers","following_url":"https://api.github.com/users/autographdevelopers/following{/other_user}","gists_url":"https://api.github.com/users/autographdevelopers/gists{/gist_id}","starred_url":"https://api.github.com/users/autographdevelopers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/autographdevelopers/subscriptions","organizations_url":"https://api.github.com/users/autographdevelopers/orgs","repos_url":"https://api.github.com/users/autographdevelopers/repos","events_url":"https://api.github.com/users/autographdevelopers/events{/privacy}","received_events_url":"https://api.github.com/users/autographdevelopers/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/autographdevelopers/autograph-api","description":null,"fork":false,"url":"https://api.github.com/repos/autographdevelopers/autograph-api","forks_url":"https://api.github.com/repos/autographdevelopers/autograph-api/forks","keys_url":"https://api.github.com/repos/autographdevelopers/autograph-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/autographdevelopers/autograph-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/autographdevelopers/autograph-api/teams","hooks_url":"https://api.github.com/repos/autographdevelopers/autograph-api/hooks","issue_events_url":"https://api.github.com/repos/autographdevelopers/autograph-api/issues/events{/number}","events_url":"https://api.github.com/repos/autographdevelopers/autograph-api/events","assignees_url":"https://api.github.com/repos/autographdevelopers/autograph-api/assignees{/user}","branches_url":"https://api.github.com/repos/autographdevelopers/autograph-api/branches{/branch}","tags_url":"https://api.github.com/repos/autographdevelopers/autograph-api/tags","blobs_url":"https://api.github.com/repos/autographdevelopers/autograph-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/autographdevelopers/autograph-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/autographdevelopers/autograph-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/autographdevelopers/autograph-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/autographdevelopers/autograph-api/statuses/{sha}","languages_url":"https://api.github.com/repos/autographdevelopers/autograph-api/languages","stargazers_url":"https://api.github.com/repos/autographdevelopers/autograph-api/stargazers","contributors_url":"https://api.github.com/repos/autographdevelopers/autograph-api/contributors","subscribers_url":"https://api.github.com/repos/autographdevelopers/autograph-api/subscribers","subscription_url":"https://api.github.com/repos/autographdevelopers/autograph-api/subscription","commits_url":"https://api.github.com/repos/autographdevelopers/autograph-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/autographdevelopers/autograph-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/autographdevelopers/autograph-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/autographdevelopers/autograph-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/autographdevelopers/autograph-api/contents/{+path}","compare_url":"https://api.github.com/repos/autographdevelopers/autograph-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/autographdevelopers/autograph-api/merges","archive_url":"https://api.github.com/repos/autographdevelopers/autograph-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/autographdevelopers/autograph-api/downloads","issues_url":"https://api.github.com/repos/autographdevelopers/autograph-api/issues{/number}","pulls_url":"https://api.github.com/repos/autographdevelopers/autograph-api/pulls{/number}","milestones_url":"https://api.github.com/repos/autographdevelopers/autograph-api/milestones{/number}","notifications_url":"https://api.github.com/repos/autographdevelopers/autograph-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/autographdevelopers/autograph-api/labels{/name}","releases_url":"https://api.github.com/repos/autographdevelopers/autograph-api/releases{/id}","deployments_url":"https://api.github.com/repos/autographdevelopers/autograph-api/deployments","created_at":"2017-11-09T18:13:13Z","updated_at":"2017-11-09T18:38:09Z","pushed_at":"2017-12-20T20:59:59Z","git_url":"git://github.com/autographdevelopers/autograph-api.git","ssh_url":"git@github.com:autographdevelopers/autograph-api.git","clone_url":"https://github.com/autographdevelopers/autograph-api.git","svn_url":"https://github.com/autographdevelopers/autograph-api","homepage":null,"size":122,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/autographdevelopers/autograph-api/pulls/7"},"html":{"href":"https://github.com/autographdevelopers/autograph-api/pull/7"},"issue":{"href":"https://api.github.com/repos/autographdevelopers/autograph-api/issues/7"},"comments":{"href":"https://api.github.com/repos/autographdevelopers/autograph-api/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/autographdevelopers/autograph-api/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/autographdevelopers/autograph-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/autographdevelopers/autograph-api/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/autographdevelopers/autograph-api/statuses/895253a08ac1b84faf4e682bdb8433aa1a598f8d"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"pospieszynski"}}