{"action":"created","comment":{"url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/pulls/comments/85121911","pull_request_review_id":5854528,"id":85121911,"diff_hunk":"@@ -0,0 +1,56 @@\n+module GlimrApiClient\n+  class RegisterNewCase < Base\n+    def initialize(params)\n+      @params = params\n+    end\n+\n+    private\n+\n+    def check_request!\n+      errors = []\n+      [\n+        :jurisdictionId,\n+        :onlineMappingCode\n+      ].each do |required|\n+        errors << required if request_body.fetch(required).blank?\n+      end\n+      raise RequestError, errors unless errors.blank?\n+    end\n+\n+    def endpoint\n+      '/registernewcase'\n+    end\n+\n+    def request_body","path":"lib/glimr_api_client/register_new_case.rb","position":24,"original_position":24,"commit_id":"2e3dfd55c0c2851e04be6fe88c3e483bc5a8f89f","original_commit_id":"2e3dfd55c0c2851e04be6fe88c3e483bc5a8f89f","user":{"login":"tatyree","id":20921,"avatar_url":"https://avatars.githubusercontent.com/u/20921?v=3","gravatar_id":"","url":"https://api.github.com/users/tatyree","html_url":"https://github.com/tatyree","followers_url":"https://api.github.com/users/tatyree/followers","following_url":"https://api.github.com/users/tatyree/following{/other_user}","gists_url":"https://api.github.com/users/tatyree/gists{/gist_id}","starred_url":"https://api.github.com/users/tatyree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tatyree/subscriptions","organizations_url":"https://api.github.com/users/tatyree/orgs","repos_url":"https://api.github.com/users/tatyree/repos","events_url":"https://api.github.com/users/tatyree/events{/privacy}","received_events_url":"https://api.github.com/users/tatyree/received_events","type":"User","site_admin":false},"body":"unk...\r\n\r\nSorry, not helpful...Mainly just meant \"wow, that's a lot of body params...\" ","created_at":"2016-10-26T13:31:17Z","updated_at":"2016-10-26T13:37:09Z","html_url":"https://github.com/ministryofjustice/glimr-api-client/pull/9#discussion_r85121911","pull_request_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/pulls/9","_links":{"self":{"href":"https://api.github.com/repos/ministryofjustice/glimr-api-client/pulls/comments/85121911"},"html":{"href":"https://github.com/ministryofjustice/glimr-api-client/pull/9#discussion_r85121911"},"pull_request":{"href":"https://api.github.com/repos/ministryofjustice/glimr-api-client/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/pulls/9","id":91003224,"html_url":"https://github.com/ministryofjustice/glimr-api-client/pull/9","diff_url":"https://github.com/ministryofjustice/glimr-api-client/pull/9.diff","patch_url":"https://github.com/ministryofjustice/glimr-api-client/pull/9.patch","issue_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/issues/9","number":9,"state":"open","locked":false,"title":"Add register new case","user":{"login":"digitalronin","id":2338,"avatar_url":"https://avatars.githubusercontent.com/u/2338?v=3","gravatar_id":"","url":"https://api.github.com/users/digitalronin","html_url":"https://github.com/digitalronin","followers_url":"https://api.github.com/users/digitalronin/followers","following_url":"https://api.github.com/users/digitalronin/following{/other_user}","gists_url":"https://api.github.com/users/digitalronin/gists{/gist_id}","starred_url":"https://api.github.com/users/digitalronin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/digitalronin/subscriptions","organizations_url":"https://api.github.com/users/digitalronin/orgs","repos_url":"https://api.github.com/users/digitalronin/repos","events_url":"https://api.github.com/users/digitalronin/events{/privacy}","received_events_url":"https://api.github.com/users/digitalronin/received_events","type":"User","site_admin":false},"body":"This change implements the registerNewCase GLiMR API call, and includes some refactoring of common code.","created_at":"2016-10-26T13:24:17Z","updated_at":"2016-10-26T13:37:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bd60c37285eef66eeb04cc53355489bd1eae2265","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/pulls/9/commits","review_comments_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/pulls/9/comments","review_comment_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/issues/9/comments","statuses_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/statuses/2e3dfd55c0c2851e04be6fe88c3e483bc5a8f89f","head":{"label":"ministryofjustice:add-register-new-case","ref":"add-register-new-case","sha":"2e3dfd55c0c2851e04be6fe88c3e483bc5a8f89f","user":{"login":"ministryofjustice","id":2203574,"avatar_url":"https://avatars.githubusercontent.com/u/2203574?v=3","gravatar_id":"","url":"https://api.github.com/users/ministryofjustice","html_url":"https://github.com/ministryofjustice","followers_url":"https://api.github.com/users/ministryofjustice/followers","following_url":"https://api.github.com/users/ministryofjustice/following{/other_user}","gists_url":"https://api.github.com/users/ministryofjustice/gists{/gist_id}","starred_url":"https://api.github.com/users/ministryofjustice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ministryofjustice/subscriptions","organizations_url":"https://api.github.com/users/ministryofjustice/orgs","repos_url":"https://api.github.com/users/ministryofjustice/repos","events_url":"https://api.github.com/users/ministryofjustice/events{/privacy}","received_events_url":"https://api.github.com/users/ministryofjustice/received_events","type":"Organization","site_admin":false},"repo":{"id":66476618,"name":"glimr-api-client","full_name":"ministryofjustice/glimr-api-client","owner":{"login":"ministryofjustice","id":2203574,"avatar_url":"https://avatars.githubusercontent.com/u/2203574?v=3","gravatar_id":"","url":"https://api.github.com/users/ministryofjustice","html_url":"https://github.com/ministryofjustice","followers_url":"https://api.github.com/users/ministryofjustice/followers","following_url":"https://api.github.com/users/ministryofjustice/following{/other_user}","gists_url":"https://api.github.com/users/ministryofjustice/gists{/gist_id}","starred_url":"https://api.github.com/users/ministryofjustice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ministryofjustice/subscriptions","organizations_url":"https://api.github.com/users/ministryofjustice/orgs","repos_url":"https://api.github.com/users/ministryofjustice/repos","events_url":"https://api.github.com/users/ministryofjustice/events{/privacy}","received_events_url":"https://api.github.com/users/ministryofjustice/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ministryofjustice/glimr-api-client","description":"An API client for integrating with the GLiMR case management system.","fork":false,"url":"https://api.github.com/repos/ministryofjustice/glimr-api-client","forks_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/forks","keys_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/teams","hooks_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/hooks","issue_events_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/issues/events{/number}","events_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/events","assignees_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/assignees{/user}","branches_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/branches{/branch}","tags_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/tags","blobs_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/statuses/{sha}","languages_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/languages","stargazers_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/stargazers","contributors_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/contributors","subscribers_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/subscribers","subscription_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/subscription","commits_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/contents/{+path}","compare_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/merges","archive_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/downloads","issues_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/issues{/number}","pulls_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/pulls{/number}","milestones_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/milestones{/number}","notifications_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/labels{/name}","releases_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/releases{/id}","deployments_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/deployments","created_at":"2016-08-24T15:35:01Z","updated_at":"2016-08-24T15:38:33Z","pushed_at":"2016-10-26T13:24:17Z","git_url":"git://github.com/ministryofjustice/glimr-api-client.git","ssh_url":"git@github.com:ministryofjustice/glimr-api-client.git","clone_url":"https://github.com/ministryofjustice/glimr-api-client.git","svn_url":"https://github.com/ministryofjustice/glimr-api-client","homepage":null,"size":72,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"ministryofjustice:master","ref":"master","sha":"cf281e491e24cea5b77f8d151b9550131664266b","user":{"login":"ministryofjustice","id":2203574,"avatar_url":"https://avatars.githubusercontent.com/u/2203574?v=3","gravatar_id":"","url":"https://api.github.com/users/ministryofjustice","html_url":"https://github.com/ministryofjustice","followers_url":"https://api.github.com/users/ministryofjustice/followers","following_url":"https://api.github.com/users/ministryofjustice/following{/other_user}","gists_url":"https://api.github.com/users/ministryofjustice/gists{/gist_id}","starred_url":"https://api.github.com/users/ministryofjustice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ministryofjustice/subscriptions","organizations_url":"https://api.github.com/users/ministryofjustice/orgs","repos_url":"https://api.github.com/users/ministryofjustice/repos","events_url":"https://api.github.com/users/ministryofjustice/events{/privacy}","received_events_url":"https://api.github.com/users/ministryofjustice/received_events","type":"Organization","site_admin":false},"repo":{"id":66476618,"name":"glimr-api-client","full_name":"ministryofjustice/glimr-api-client","owner":{"login":"ministryofjustice","id":2203574,"avatar_url":"https://avatars.githubusercontent.com/u/2203574?v=3","gravatar_id":"","url":"https://api.github.com/users/ministryofjustice","html_url":"https://github.com/ministryofjustice","followers_url":"https://api.github.com/users/ministryofjustice/followers","following_url":"https://api.github.com/users/ministryofjustice/following{/other_user}","gists_url":"https://api.github.com/users/ministryofjustice/gists{/gist_id}","starred_url":"https://api.github.com/users/ministryofjustice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ministryofjustice/subscriptions","organizations_url":"https://api.github.com/users/ministryofjustice/orgs","repos_url":"https://api.github.com/users/ministryofjustice/repos","events_url":"https://api.github.com/users/ministryofjustice/events{/privacy}","received_events_url":"https://api.github.com/users/ministryofjustice/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ministryofjustice/glimr-api-client","description":"An API client for integrating with the GLiMR case management system.","fork":false,"url":"https://api.github.com/repos/ministryofjustice/glimr-api-client","forks_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/forks","keys_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/teams","hooks_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/hooks","issue_events_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/issues/events{/number}","events_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/events","assignees_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/assignees{/user}","branches_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/branches{/branch}","tags_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/tags","blobs_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/statuses/{sha}","languages_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/languages","stargazers_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/stargazers","contributors_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/contributors","subscribers_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/subscribers","subscription_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/subscription","commits_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/contents/{+path}","compare_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/merges","archive_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/downloads","issues_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/issues{/number}","pulls_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/pulls{/number}","milestones_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/milestones{/number}","notifications_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/labels{/name}","releases_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/releases{/id}","deployments_url":"https://api.github.com/repos/ministryofjustice/glimr-api-client/deployments","created_at":"2016-08-24T15:35:01Z","updated_at":"2016-08-24T15:38:33Z","pushed_at":"2016-10-26T13:24:17Z","git_url":"git://github.com/ministryofjustice/glimr-api-client.git","ssh_url":"git@github.com:ministryofjustice/glimr-api-client.git","clone_url":"https://github.com/ministryofjustice/glimr-api-client.git","svn_url":"https://github.com/ministryofjustice/glimr-api-client","homepage":null,"size":72,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ministryofjustice/glimr-api-client/pulls/9"},"html":{"href":"https://github.com/ministryofjustice/glimr-api-client/pull/9"},"issue":{"href":"https://api.github.com/repos/ministryofjustice/glimr-api-client/issues/9"},"comments":{"href":"https://api.github.com/repos/ministryofjustice/glimr-api-client/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/ministryofjustice/glimr-api-client/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/ministryofjustice/glimr-api-client/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ministryofjustice/glimr-api-client/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/ministryofjustice/glimr-api-client/statuses/2e3dfd55c0c2851e04be6fe88c3e483bc5a8f89f"}}}}
{"actor":{"display_login":"tatyree"}}