{"action":"created","comment":{"url":"https://api.github.com/repos/companieshouse/document-generator/pulls/comments/214926217","pull_request_review_id":152081039,"id":214926217,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNDkyNjIxNw==","diff_hunk":"@@ -0,0 +1,33 @@\n+package uk.gov.companieshouse.document.generator.accounts.service.impl;\n+\n+import org.springframework.http.HttpStatus;\n+import org.springframework.http.ResponseEntity;\n+import org.springframework.stereotype.Service;\n+import uk.gov.companieshouse.api.model.accounts.Accounts;\n+import uk.gov.companieshouse.document.generator.accounts.data.accounts.AccountsManager;\n+import uk.gov.companieshouse.document.generator.accounts.service.AccountsService;\n+import uk.gov.companieshouse.logging.Logger;\n+import uk.gov.companieshouse.logging.LoggerFactory;\n+\n+@Service\n+public class AccountsServiceImpl implements AccountsService {\n+\n+    private static final Logger LOG = LoggerFactory.getLogger(\"document-generator-accounts\");\n+\n+    /**\n+     * {@inheritDoc}\n+     */\n+    @Override\n+    public Accounts getAccounts(String resource) {\n+        LOG.info(\"Getting accounts data from abridged-accounts-api\");","path":"document-generator-accounts/src/main/java/uk/gov/companieshouse/document/generator/accounts/service/impl/AccountsServiceImpl.java","position":22,"original_position":22,"commit_id":"32929b6d490e866e5ff89b12794b7093461572b4","original_commit_id":"32929b6d490e866e5ff89b12794b7093461572b4","user":{"login":"ChrisJBurns","id":29541485,"node_id":"MDQ6VXNlcjI5NTQxNDg1","avatar_url":"https://avatars2.githubusercontent.com/u/29541485?v=4","gravatar_id":"","url":"https://api.github.com/users/ChrisJBurns","html_url":"https://github.com/ChrisJBurns","followers_url":"https://api.github.com/users/ChrisJBurns/followers","following_url":"https://api.github.com/users/ChrisJBurns/following{/other_user}","gists_url":"https://api.github.com/users/ChrisJBurns/gists{/gist_id}","starred_url":"https://api.github.com/users/ChrisJBurns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChrisJBurns/subscriptions","organizations_url":"https://api.github.com/users/ChrisJBurns/orgs","repos_url":"https://api.github.com/users/ChrisJBurns/repos","events_url":"https://api.github.com/users/ChrisJBurns/events{/privacy}","received_events_url":"https://api.github.com/users/ChrisJBurns/received_events","type":"User","site_admin":false},"body":"As mentioned in my other comment, logging will be fine-tuned in a separate PR :)","created_at":"2018-09-04T14:02:59Z","updated_at":"2018-09-04T14:03:00Z","html_url":"https://github.com/companieshouse/document-generator/pull/17#discussion_r214926217","pull_request_url":"https://api.github.com/repos/companieshouse/document-generator/pulls/17","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/companieshouse/document-generator/pulls/comments/214926217"},"html":{"href":"https://github.com/companieshouse/document-generator/pull/17#discussion_r214926217"},"pull_request":{"href":"https://api.github.com/repos/companieshouse/document-generator/pulls/17"}},"in_reply_to_id":214923810},"pull_request":{"url":"https://api.github.com/repos/companieshouse/document-generator/pulls/17","id":212947854,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEyOTQ3ODU0","html_url":"https://github.com/companieshouse/document-generator/pull/17","diff_url":"https://github.com/companieshouse/document-generator/pull/17.diff","patch_url":"https://github.com/companieshouse/document-generator/pull/17.patch","issue_url":"https://api.github.com/repos/companieshouse/document-generator/issues/17","number":17,"state":"open","locked":false,"title":"Adds accounts retrieval implementation for abridged","user":{"login":"ChrisJBurns","id":29541485,"node_id":"MDQ6VXNlcjI5NTQxNDg1","avatar_url":"https://avatars2.githubusercontent.com/u/29541485?v=4","gravatar_id":"","url":"https://api.github.com/users/ChrisJBurns","html_url":"https://github.com/ChrisJBurns","followers_url":"https://api.github.com/users/ChrisJBurns/followers","following_url":"https://api.github.com/users/ChrisJBurns/following{/other_user}","gists_url":"https://api.github.com/users/ChrisJBurns/gists{/gist_id}","starred_url":"https://api.github.com/users/ChrisJBurns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChrisJBurns/subscriptions","organizations_url":"https://api.github.com/users/ChrisJBurns/orgs","repos_url":"https://api.github.com/users/ChrisJBurns/repos","events_url":"https://api.github.com/users/ChrisJBurns/events{/privacy}","received_events_url":"https://api.github.com/users/ChrisJBurns/received_events","type":"User","site_admin":false},"body":"Adds the accounts retrieval implementation for abridged. Includes:\r\n- AccountType enum for document generator\r\n- temporary private api sdk implementation for retrieval of accounts data\r\n- AccountsService that interacts with the private-sdk:\r\n    - adds the AccountsService interfact\r\n    - adds the AccountsServiceImpl implementation\r\n    - adds base test file ready for when the temporary private sdk solution is replaced by permanent one\r\n- accounts retrieval logic for abridged\r\n    - adds accounts retrieval logic for the abridged implementation\r\n    - modifies test to deal with new scenarios of null accounts data from service and incorrect AccountType\r\n\r\nImplements: SFA-567","created_at":"2018-09-04T11:45:42Z","updated_at":"2018-09-04T14:03:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ea6b2e270e1369f72e96869735183d37d5fe6a4f","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/companieshouse/document-generator/pulls/17/commits","review_comments_url":"https://api.github.com/repos/companieshouse/document-generator/pulls/17/comments","review_comment_url":"https://api.github.com/repos/companieshouse/document-generator/pulls/comments{/number}","comments_url":"https://api.github.com/repos/companieshouse/document-generator/issues/17/comments","statuses_url":"https://api.github.com/repos/companieshouse/document-generator/statuses/32929b6d490e866e5ff89b12794b7093461572b4","head":{"label":"companieshouse:feature/add-accounts-data-retrieval","ref":"feature/add-accounts-data-retrieval","sha":"32929b6d490e866e5ff89b12794b7093461572b4","user":{"login":"companieshouse","id":4947323,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ5NDczMjM=","avatar_url":"https://avatars0.githubusercontent.com/u/4947323?v=4","gravatar_id":"","url":"https://api.github.com/users/companieshouse","html_url":"https://github.com/companieshouse","followers_url":"https://api.github.com/users/companieshouse/followers","following_url":"https://api.github.com/users/companieshouse/following{/other_user}","gists_url":"https://api.github.com/users/companieshouse/gists{/gist_id}","starred_url":"https://api.github.com/users/companieshouse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/companieshouse/subscriptions","organizations_url":"https://api.github.com/users/companieshouse/orgs","repos_url":"https://api.github.com/users/companieshouse/repos","events_url":"https://api.github.com/users/companieshouse/events{/privacy}","received_events_url":"https://api.github.com/users/companieshouse/received_events","type":"Organization","site_admin":false},"repo":{"id":141528188,"node_id":"MDEwOlJlcG9zaXRvcnkxNDE1MjgxODg=","name":"document-generator","full_name":"companieshouse/document-generator","owner":{"login":"companieshouse","id":4947323,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ5NDczMjM=","avatar_url":"https://avatars0.githubusercontent.com/u/4947323?v=4","gravatar_id":"","url":"https://api.github.com/users/companieshouse","html_url":"https://github.com/companieshouse","followers_url":"https://api.github.com/users/companieshouse/followers","following_url":"https://api.github.com/users/companieshouse/following{/other_user}","gists_url":"https://api.github.com/users/companieshouse/gists{/gist_id}","starred_url":"https://api.github.com/users/companieshouse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/companieshouse/subscriptions","organizations_url":"https://api.github.com/users/companieshouse/orgs","repos_url":"https://api.github.com/users/companieshouse/repos","events_url":"https://api.github.com/users/companieshouse/events{/privacy}","received_events_url":"https://api.github.com/users/companieshouse/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/companieshouse/document-generator","description":"Document generation services","fork":false,"url":"https://api.github.com/repos/companieshouse/document-generator","forks_url":"https://api.github.com/repos/companieshouse/document-generator/forks","keys_url":"https://api.github.com/repos/companieshouse/document-generator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/companieshouse/document-generator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/companieshouse/document-generator/teams","hooks_url":"https://api.github.com/repos/companieshouse/document-generator/hooks","issue_events_url":"https://api.github.com/repos/companieshouse/document-generator/issues/events{/number}","events_url":"https://api.github.com/repos/companieshouse/document-generator/events","assignees_url":"https://api.github.com/repos/companieshouse/document-generator/assignees{/user}","branches_url":"https://api.github.com/repos/companieshouse/document-generator/branches{/branch}","tags_url":"https://api.github.com/repos/companieshouse/document-generator/tags","blobs_url":"https://api.github.com/repos/companieshouse/document-generator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/companieshouse/document-generator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/companieshouse/document-generator/git/refs{/sha}","trees_url":"https://api.github.com/repos/companieshouse/document-generator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/companieshouse/document-generator/statuses/{sha}","languages_url":"https://api.github.com/repos/companieshouse/document-generator/languages","stargazers_url":"https://api.github.com/repos/companieshouse/document-generator/stargazers","contributors_url":"https://api.github.com/repos/companieshouse/document-generator/contributors","subscribers_url":"https://api.github.com/repos/companieshouse/document-generator/subscribers","subscription_url":"https://api.github.com/repos/companieshouse/document-generator/subscription","commits_url":"https://api.github.com/repos/companieshouse/document-generator/commits{/sha}","git_commits_url":"https://api.github.com/repos/companieshouse/document-generator/git/commits{/sha}","comments_url":"https://api.github.com/repos/companieshouse/document-generator/comments{/number}","issue_comment_url":"https://api.github.com/repos/companieshouse/document-generator/issues/comments{/number}","contents_url":"https://api.github.com/repos/companieshouse/document-generator/contents/{+path}","compare_url":"https://api.github.com/repos/companieshouse/document-generator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/companieshouse/document-generator/merges","archive_url":"https://api.github.com/repos/companieshouse/document-generator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/companieshouse/document-generator/downloads","issues_url":"https://api.github.com/repos/companieshouse/document-generator/issues{/number}","pulls_url":"https://api.github.com/repos/companieshouse/document-generator/pulls{/number}","milestones_url":"https://api.github.com/repos/companieshouse/document-generator/milestones{/number}","notifications_url":"https://api.github.com/repos/companieshouse/document-generator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/companieshouse/document-generator/labels{/name}","releases_url":"https://api.github.com/repos/companieshouse/document-generator/releases{/id}","deployments_url":"https://api.github.com/repos/companieshouse/document-generator/deployments","created_at":"2018-07-19T05:23:16Z","updated_at":"2018-09-04T10:07:55Z","pushed_at":"2018-09-04T13:30:09Z","git_url":"git://github.com/companieshouse/document-generator.git","ssh_url":"git@github.com:companieshouse/document-generator.git","clone_url":"https://github.com/companieshouse/document-generator.git","svn_url":"https://github.com/companieshouse/document-generator","homepage":null,"size":178,"stargazers_count":0,"watchers_count":0,"language":"Java","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":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":2,"watchers":0,"default_branch":"develop"}},"base":{"label":"companieshouse:develop","ref":"develop","sha":"ef4ded8ec6a6eafefdf1c1455b78101512cd13c4","user":{"login":"companieshouse","id":4947323,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ5NDczMjM=","avatar_url":"https://avatars0.githubusercontent.com/u/4947323?v=4","gravatar_id":"","url":"https://api.github.com/users/companieshouse","html_url":"https://github.com/companieshouse","followers_url":"https://api.github.com/users/companieshouse/followers","following_url":"https://api.github.com/users/companieshouse/following{/other_user}","gists_url":"https://api.github.com/users/companieshouse/gists{/gist_id}","starred_url":"https://api.github.com/users/companieshouse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/companieshouse/subscriptions","organizations_url":"https://api.github.com/users/companieshouse/orgs","repos_url":"https://api.github.com/users/companieshouse/repos","events_url":"https://api.github.com/users/companieshouse/events{/privacy}","received_events_url":"https://api.github.com/users/companieshouse/received_events","type":"Organization","site_admin":false},"repo":{"id":141528188,"node_id":"MDEwOlJlcG9zaXRvcnkxNDE1MjgxODg=","name":"document-generator","full_name":"companieshouse/document-generator","owner":{"login":"companieshouse","id":4947323,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ5NDczMjM=","avatar_url":"https://avatars0.githubusercontent.com/u/4947323?v=4","gravatar_id":"","url":"https://api.github.com/users/companieshouse","html_url":"https://github.com/companieshouse","followers_url":"https://api.github.com/users/companieshouse/followers","following_url":"https://api.github.com/users/companieshouse/following{/other_user}","gists_url":"https://api.github.com/users/companieshouse/gists{/gist_id}","starred_url":"https://api.github.com/users/companieshouse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/companieshouse/subscriptions","organizations_url":"https://api.github.com/users/companieshouse/orgs","repos_url":"https://api.github.com/users/companieshouse/repos","events_url":"https://api.github.com/users/companieshouse/events{/privacy}","received_events_url":"https://api.github.com/users/companieshouse/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/companieshouse/document-generator","description":"Document generation services","fork":false,"url":"https://api.github.com/repos/companieshouse/document-generator","forks_url":"https://api.github.com/repos/companieshouse/document-generator/forks","keys_url":"https://api.github.com/repos/companieshouse/document-generator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/companieshouse/document-generator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/companieshouse/document-generator/teams","hooks_url":"https://api.github.com/repos/companieshouse/document-generator/hooks","issue_events_url":"https://api.github.com/repos/companieshouse/document-generator/issues/events{/number}","events_url":"https://api.github.com/repos/companieshouse/document-generator/events","assignees_url":"https://api.github.com/repos/companieshouse/document-generator/assignees{/user}","branches_url":"https://api.github.com/repos/companieshouse/document-generator/branches{/branch}","tags_url":"https://api.github.com/repos/companieshouse/document-generator/tags","blobs_url":"https://api.github.com/repos/companieshouse/document-generator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/companieshouse/document-generator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/companieshouse/document-generator/git/refs{/sha}","trees_url":"https://api.github.com/repos/companieshouse/document-generator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/companieshouse/document-generator/statuses/{sha}","languages_url":"https://api.github.com/repos/companieshouse/document-generator/languages","stargazers_url":"https://api.github.com/repos/companieshouse/document-generator/stargazers","contributors_url":"https://api.github.com/repos/companieshouse/document-generator/contributors","subscribers_url":"https://api.github.com/repos/companieshouse/document-generator/subscribers","subscription_url":"https://api.github.com/repos/companieshouse/document-generator/subscription","commits_url":"https://api.github.com/repos/companieshouse/document-generator/commits{/sha}","git_commits_url":"https://api.github.com/repos/companieshouse/document-generator/git/commits{/sha}","comments_url":"https://api.github.com/repos/companieshouse/document-generator/comments{/number}","issue_comment_url":"https://api.github.com/repos/companieshouse/document-generator/issues/comments{/number}","contents_url":"https://api.github.com/repos/companieshouse/document-generator/contents/{+path}","compare_url":"https://api.github.com/repos/companieshouse/document-generator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/companieshouse/document-generator/merges","archive_url":"https://api.github.com/repos/companieshouse/document-generator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/companieshouse/document-generator/downloads","issues_url":"https://api.github.com/repos/companieshouse/document-generator/issues{/number}","pulls_url":"https://api.github.com/repos/companieshouse/document-generator/pulls{/number}","milestones_url":"https://api.github.com/repos/companieshouse/document-generator/milestones{/number}","notifications_url":"https://api.github.com/repos/companieshouse/document-generator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/companieshouse/document-generator/labels{/name}","releases_url":"https://api.github.com/repos/companieshouse/document-generator/releases{/id}","deployments_url":"https://api.github.com/repos/companieshouse/document-generator/deployments","created_at":"2018-07-19T05:23:16Z","updated_at":"2018-09-04T10:07:55Z","pushed_at":"2018-09-04T13:30:09Z","git_url":"git://github.com/companieshouse/document-generator.git","ssh_url":"git@github.com:companieshouse/document-generator.git","clone_url":"https://github.com/companieshouse/document-generator.git","svn_url":"https://github.com/companieshouse/document-generator","homepage":null,"size":178,"stargazers_count":0,"watchers_count":0,"language":"Java","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":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":2,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/companieshouse/document-generator/pulls/17"},"html":{"href":"https://github.com/companieshouse/document-generator/pull/17"},"issue":{"href":"https://api.github.com/repos/companieshouse/document-generator/issues/17"},"comments":{"href":"https://api.github.com/repos/companieshouse/document-generator/issues/17/comments"},"review_comments":{"href":"https://api.github.com/repos/companieshouse/document-generator/pulls/17/comments"},"review_comment":{"href":"https://api.github.com/repos/companieshouse/document-generator/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/companieshouse/document-generator/pulls/17/commits"},"statuses":{"href":"https://api.github.com/repos/companieshouse/document-generator/statuses/32929b6d490e866e5ff89b12794b7093461572b4"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"ChrisJBurns"}}