{"action":"created","comment":{"url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/pulls/comments/92632033","pull_request_review_id":13151540,"id":92632033,"diff_hunk":"@@ -0,0 +1,73 @@\n+require 'glimr_api_client'\n+\n+class GlimrNewCase\n+  attr_reader :tribunal_case, :case_reference, :confirmation_code\n+  alias_attribute :tc, :tribunal_case\n+\n+  def initialize(tribunal_case)\n+    @tribunal_case = tribunal_case\n+  end\n+\n+  def call!\n+    response = GlimrApiClient::RegisterNewCase.call(params)\n+    @case_reference = response.response_body[:tribunalCaseNumber]\n+    @confirmation_code = response.response_body[:confirmationCode]\n+  end\n+\n+  # TODO: find out where to obtain all the required information\n+  def params\n+    {\n+      jurisdictionId: jurisdiction_id,\n+      onlineMappingCode: tc.case_type,\n+      contactFirstName: taxpayer_first_name,","path":"app/services/glimr_new_case.rb","position":22,"original_position":22,"commit_id":"a186c636117de8163d7be7fef57e2703d78d6ca7","original_commit_id":"a186c636117de8163d7be7fef57e2703d78d6ca7","user":{"login":"csutter","id":72141,"avatar_url":"https://avatars.githubusercontent.com/u/72141?v=3","gravatar_id":"","url":"https://api.github.com/users/csutter","html_url":"https://github.com/csutter","followers_url":"https://api.github.com/users/csutter/followers","following_url":"https://api.github.com/users/csutter/following{/other_user}","gists_url":"https://api.github.com/users/csutter/gists{/gist_id}","starred_url":"https://api.github.com/users/csutter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/csutter/subscriptions","organizations_url":"https://api.github.com/users/csutter/orgs","repos_url":"https://api.github.com/users/csutter/repos","events_url":"https://api.github.com/users/csutter/events{/privacy}","received_events_url":"https://api.github.com/users/csutter/received_events","type":"User","site_admin":false},"body":"The way we have it right now, first/last name are only defined for individuals, not companies. Does GLiMR require these fields for non-individual appellants?","created_at":"2016-12-15T15:32:55Z","updated_at":"2016-12-15T15:32:55Z","html_url":"https://github.com/ministryofjustice/tax-tribunals-datacapture/pull/69#discussion_r92632033","pull_request_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/pulls/69","_links":{"self":{"href":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/pulls/comments/92632033"},"html":{"href":"https://github.com/ministryofjustice/tax-tribunals-datacapture/pull/69#discussion_r92632033"},"pull_request":{"href":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/pulls/69"}}},"pull_request":{"url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/pulls/69","id":97914402,"html_url":"https://github.com/ministryofjustice/tax-tribunals-datacapture/pull/69","diff_url":"https://github.com/ministryofjustice/tax-tribunals-datacapture/pull/69.diff","patch_url":"https://github.com/ministryofjustice/tax-tribunals-datacapture/pull/69.patch","issue_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/issues/69","number":69,"state":"open","locked":false,"title":"Create new cases in GLiMR.","user":{"login":"zheileman","id":687910,"avatar_url":"https://avatars.githubusercontent.com/u/687910?v=3","gravatar_id":"","url":"https://api.github.com/users/zheileman","html_url":"https://github.com/zheileman","followers_url":"https://api.github.com/users/zheileman/followers","following_url":"https://api.github.com/users/zheileman/following{/other_user}","gists_url":"https://api.github.com/users/zheileman/gists{/gist_id}","starred_url":"https://api.github.com/users/zheileman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zheileman/subscriptions","organizations_url":"https://api.github.com/users/zheileman/orgs","repos_url":"https://api.github.com/users/zheileman/repos","events_url":"https://api.github.com/users/zheileman/events{/privacy}","received_events_url":"https://api.github.com/users/zheileman/received_events","type":"User","site_admin":false},"body":"This is a starting point as we don't have yet all the information to be sent to GLiMR\r\nand also we don't have yet the summary page that will trigger the call to create the cases.\r\n\r\nOther missing bits are the API call to store the TC number and confirmation code and return\r\nthe payment URL to redirect the user to. This will be implemented as a separate PR as to not make this one too big.","created_at":"2016-12-14T09:23:40Z","updated_at":"2016-12-15T15:55:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5f6f019749bd50946832bf2e81de5664082c73a7","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/pulls/69/commits","review_comments_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/pulls/69/comments","review_comment_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/issues/69/comments","statuses_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/statuses/a186c636117de8163d7be7fef57e2703d78d6ca7","head":{"label":"ministryofjustice:register-glimr-case","ref":"register-glimr-case","sha":"a186c636117de8163d7be7fef57e2703d78d6ca7","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":71446242,"name":"tax-tribunals-datacapture","full_name":"ministryofjustice/tax-tribunals-datacapture","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/tax-tribunals-datacapture","description":"Appeal to the Tax Tribunal","fork":false,"url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture","forks_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/forks","keys_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/teams","hooks_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/hooks","issue_events_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/issues/events{/number}","events_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/events","assignees_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/assignees{/user}","branches_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/branches{/branch}","tags_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/tags","blobs_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/git/refs{/sha}","trees_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/statuses/{sha}","languages_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/languages","stargazers_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/stargazers","contributors_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/contributors","subscribers_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/subscribers","subscription_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/subscription","commits_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/commits{/sha}","git_commits_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/git/commits{/sha}","comments_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/comments{/number}","issue_comment_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/issues/comments{/number}","contents_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/contents/{+path}","compare_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/merges","archive_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/downloads","issues_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/issues{/number}","pulls_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/pulls{/number}","milestones_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/milestones{/number}","notifications_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/labels{/name}","releases_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/releases{/id}","deployments_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/deployments","created_at":"2016-10-20T09:21:34Z","updated_at":"2016-10-20T09:21:43Z","pushed_at":"2016-12-15T15:26:06Z","git_url":"git://github.com/ministryofjustice/tax-tribunals-datacapture.git","ssh_url":"git@github.com:ministryofjustice/tax-tribunals-datacapture.git","clone_url":"https://github.com/ministryofjustice/tax-tribunals-datacapture.git","svn_url":"https://github.com/ministryofjustice/tax-tribunals-datacapture","homepage":null,"size":299,"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":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"ministryofjustice:master","ref":"master","sha":"df5b9e08a62cf2d2ab4c8bd955ec990f98f0df02","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":71446242,"name":"tax-tribunals-datacapture","full_name":"ministryofjustice/tax-tribunals-datacapture","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/tax-tribunals-datacapture","description":"Appeal to the Tax Tribunal","fork":false,"url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture","forks_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/forks","keys_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/teams","hooks_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/hooks","issue_events_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/issues/events{/number}","events_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/events","assignees_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/assignees{/user}","branches_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/branches{/branch}","tags_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/tags","blobs_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/git/refs{/sha}","trees_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/statuses/{sha}","languages_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/languages","stargazers_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/stargazers","contributors_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/contributors","subscribers_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/subscribers","subscription_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/subscription","commits_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/commits{/sha}","git_commits_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/git/commits{/sha}","comments_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/comments{/number}","issue_comment_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/issues/comments{/number}","contents_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/contents/{+path}","compare_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/merges","archive_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/downloads","issues_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/issues{/number}","pulls_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/pulls{/number}","milestones_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/milestones{/number}","notifications_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/labels{/name}","releases_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/releases{/id}","deployments_url":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/deployments","created_at":"2016-10-20T09:21:34Z","updated_at":"2016-10-20T09:21:43Z","pushed_at":"2016-12-15T15:26:06Z","git_url":"git://github.com/ministryofjustice/tax-tribunals-datacapture.git","ssh_url":"git@github.com:ministryofjustice/tax-tribunals-datacapture.git","clone_url":"https://github.com/ministryofjustice/tax-tribunals-datacapture.git","svn_url":"https://github.com/ministryofjustice/tax-tribunals-datacapture","homepage":null,"size":299,"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":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/pulls/69"},"html":{"href":"https://github.com/ministryofjustice/tax-tribunals-datacapture/pull/69"},"issue":{"href":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/issues/69"},"comments":{"href":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/issues/69/comments"},"review_comments":{"href":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/pulls/69/comments"},"review_comment":{"href":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/pulls/69/commits"},"statuses":{"href":"https://api.github.com/repos/ministryofjustice/tax-tribunals-datacapture/statuses/a186c636117de8163d7be7fef57e2703d78d6ca7"}}}}
{"actor":{"display_login":"csutter"}}