{"action":"closed","number":96,"pull_request":{"url":"https://api.github.com/repos/hmcts/send-letter-service/pulls/96","id":179715752,"html_url":"https://github.com/hmcts/send-letter-service/pull/96","diff_url":"https://github.com/hmcts/send-letter-service/pull/96.diff","patch_url":"https://github.com/hmcts/send-letter-service/pull/96.patch","issue_url":"https://api.github.com/repos/hmcts/send-letter-service/issues/96","number":96,"state":"closed","locked":false,"title":"Simplify handling new letter model in service layer","user":{"login":"rkondratowicz","id":2472141,"avatar_url":"https://avatars2.githubusercontent.com/u/2472141?v=4","gravatar_id":"","url":"https://api.github.com/users/rkondratowicz","html_url":"https://github.com/rkondratowicz","followers_url":"https://api.github.com/users/rkondratowicz/followers","following_url":"https://api.github.com/users/rkondratowicz/following{/other_user}","gists_url":"https://api.github.com/users/rkondratowicz/gists{/gist_id}","starred_url":"https://api.github.com/users/rkondratowicz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rkondratowicz/subscriptions","organizations_url":"https://api.github.com/users/rkondratowicz/orgs","repos_url":"https://api.github.com/users/rkondratowicz/repos","events_url":"https://api.github.com/users/rkondratowicz/events{/privacy}","received_events_url":"https://api.github.com/users/rkondratowicz/received_events","type":"User","site_admin":false},"body":"A separate method in service layer accepting the new model would require duplicating many tests.\r\nThis PR adds an interface that both models implement and leaves only one method in the letter service.\r\n\r\nThe only difference between two models is how document/pdf data is represented.\r\nService decides which `PdfCreator` method to call based on the type of model.","created_at":"2018-04-05T15:37:32Z","updated_at":"2018-04-06T14:13:45Z","closed_at":"2018-04-06T14:13:45Z","merged_at":"2018-04-06T14:13:45Z","merge_commit_sha":"f0b648965e2a45e51a41594c20f2319df11a4be9","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/hmcts/send-letter-service/pulls/96/commits","review_comments_url":"https://api.github.com/repos/hmcts/send-letter-service/pulls/96/comments","review_comment_url":"https://api.github.com/repos/hmcts/send-letter-service/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hmcts/send-letter-service/issues/96/comments","statuses_url":"https://api.github.com/repos/hmcts/send-letter-service/statuses/bede05c5b23c0ae3c8abe30c6a68453982647f84","head":{"label":"hmcts:refactor/simplify-handling-new-letter-model-in-service-layer","ref":"refactor/simplify-handling-new-letter-model-in-service-layer","sha":"bede05c5b23c0ae3c8abe30c6a68453982647f84","user":{"login":"hmcts","id":22817111,"avatar_url":"https://avatars1.githubusercontent.com/u/22817111?v=4","gravatar_id":"","url":"https://api.github.com/users/hmcts","html_url":"https://github.com/hmcts","followers_url":"https://api.github.com/users/hmcts/followers","following_url":"https://api.github.com/users/hmcts/following{/other_user}","gists_url":"https://api.github.com/users/hmcts/gists{/gist_id}","starred_url":"https://api.github.com/users/hmcts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmcts/subscriptions","organizations_url":"https://api.github.com/users/hmcts/orgs","repos_url":"https://api.github.com/users/hmcts/repos","events_url":"https://api.github.com/users/hmcts/events{/privacy}","received_events_url":"https://api.github.com/users/hmcts/received_events","type":"Organization","site_admin":false},"repo":{"id":126043068,"name":"send-letter-service","full_name":"hmcts/send-letter-service","owner":{"login":"hmcts","id":22817111,"avatar_url":"https://avatars1.githubusercontent.com/u/22817111?v=4","gravatar_id":"","url":"https://api.github.com/users/hmcts","html_url":"https://github.com/hmcts","followers_url":"https://api.github.com/users/hmcts/followers","following_url":"https://api.github.com/users/hmcts/following{/other_user}","gists_url":"https://api.github.com/users/hmcts/gists{/gist_id}","starred_url":"https://api.github.com/users/hmcts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmcts/subscriptions","organizations_url":"https://api.github.com/users/hmcts/orgs","repos_url":"https://api.github.com/users/hmcts/repos","events_url":"https://api.github.com/users/hmcts/events{/privacy}","received_events_url":"https://api.github.com/users/hmcts/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hmcts/send-letter-service","description":null,"fork":false,"url":"https://api.github.com/repos/hmcts/send-letter-service","forks_url":"https://api.github.com/repos/hmcts/send-letter-service/forks","keys_url":"https://api.github.com/repos/hmcts/send-letter-service/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hmcts/send-letter-service/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hmcts/send-letter-service/teams","hooks_url":"https://api.github.com/repos/hmcts/send-letter-service/hooks","issue_events_url":"https://api.github.com/repos/hmcts/send-letter-service/issues/events{/number}","events_url":"https://api.github.com/repos/hmcts/send-letter-service/events","assignees_url":"https://api.github.com/repos/hmcts/send-letter-service/assignees{/user}","branches_url":"https://api.github.com/repos/hmcts/send-letter-service/branches{/branch}","tags_url":"https://api.github.com/repos/hmcts/send-letter-service/tags","blobs_url":"https://api.github.com/repos/hmcts/send-letter-service/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hmcts/send-letter-service/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hmcts/send-letter-service/git/refs{/sha}","trees_url":"https://api.github.com/repos/hmcts/send-letter-service/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hmcts/send-letter-service/statuses/{sha}","languages_url":"https://api.github.com/repos/hmcts/send-letter-service/languages","stargazers_url":"https://api.github.com/repos/hmcts/send-letter-service/stargazers","contributors_url":"https://api.github.com/repos/hmcts/send-letter-service/contributors","subscribers_url":"https://api.github.com/repos/hmcts/send-letter-service/subscribers","subscription_url":"https://api.github.com/repos/hmcts/send-letter-service/subscription","commits_url":"https://api.github.com/repos/hmcts/send-letter-service/commits{/sha}","git_commits_url":"https://api.github.com/repos/hmcts/send-letter-service/git/commits{/sha}","comments_url":"https://api.github.com/repos/hmcts/send-letter-service/comments{/number}","issue_comment_url":"https://api.github.com/repos/hmcts/send-letter-service/issues/comments{/number}","contents_url":"https://api.github.com/repos/hmcts/send-letter-service/contents/{+path}","compare_url":"https://api.github.com/repos/hmcts/send-letter-service/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hmcts/send-letter-service/merges","archive_url":"https://api.github.com/repos/hmcts/send-letter-service/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hmcts/send-letter-service/downloads","issues_url":"https://api.github.com/repos/hmcts/send-letter-service/issues{/number}","pulls_url":"https://api.github.com/repos/hmcts/send-letter-service/pulls{/number}","milestones_url":"https://api.github.com/repos/hmcts/send-letter-service/milestones{/number}","notifications_url":"https://api.github.com/repos/hmcts/send-letter-service/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hmcts/send-letter-service/labels{/name}","releases_url":"https://api.github.com/repos/hmcts/send-letter-service/releases{/id}","deployments_url":"https://api.github.com/repos/hmcts/send-letter-service/deployments","created_at":"2018-03-20T15:49:31Z","updated_at":"2018-04-06T13:24:23Z","pushed_at":"2018-04-06T14:13:45Z","git_url":"git://github.com/hmcts/send-letter-service.git","ssh_url":"git@github.com:hmcts/send-letter-service.git","clone_url":"https://github.com/hmcts/send-letter-service.git","svn_url":"https://github.com/hmcts/send-letter-service","homepage":null,"size":1336,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"hmcts:master","ref":"master","sha":"c65a44ede27a66c4cd7be2c39ebf08fc6195c07d","user":{"login":"hmcts","id":22817111,"avatar_url":"https://avatars1.githubusercontent.com/u/22817111?v=4","gravatar_id":"","url":"https://api.github.com/users/hmcts","html_url":"https://github.com/hmcts","followers_url":"https://api.github.com/users/hmcts/followers","following_url":"https://api.github.com/users/hmcts/following{/other_user}","gists_url":"https://api.github.com/users/hmcts/gists{/gist_id}","starred_url":"https://api.github.com/users/hmcts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmcts/subscriptions","organizations_url":"https://api.github.com/users/hmcts/orgs","repos_url":"https://api.github.com/users/hmcts/repos","events_url":"https://api.github.com/users/hmcts/events{/privacy}","received_events_url":"https://api.github.com/users/hmcts/received_events","type":"Organization","site_admin":false},"repo":{"id":126043068,"name":"send-letter-service","full_name":"hmcts/send-letter-service","owner":{"login":"hmcts","id":22817111,"avatar_url":"https://avatars1.githubusercontent.com/u/22817111?v=4","gravatar_id":"","url":"https://api.github.com/users/hmcts","html_url":"https://github.com/hmcts","followers_url":"https://api.github.com/users/hmcts/followers","following_url":"https://api.github.com/users/hmcts/following{/other_user}","gists_url":"https://api.github.com/users/hmcts/gists{/gist_id}","starred_url":"https://api.github.com/users/hmcts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmcts/subscriptions","organizations_url":"https://api.github.com/users/hmcts/orgs","repos_url":"https://api.github.com/users/hmcts/repos","events_url":"https://api.github.com/users/hmcts/events{/privacy}","received_events_url":"https://api.github.com/users/hmcts/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hmcts/send-letter-service","description":null,"fork":false,"url":"https://api.github.com/repos/hmcts/send-letter-service","forks_url":"https://api.github.com/repos/hmcts/send-letter-service/forks","keys_url":"https://api.github.com/repos/hmcts/send-letter-service/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hmcts/send-letter-service/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hmcts/send-letter-service/teams","hooks_url":"https://api.github.com/repos/hmcts/send-letter-service/hooks","issue_events_url":"https://api.github.com/repos/hmcts/send-letter-service/issues/events{/number}","events_url":"https://api.github.com/repos/hmcts/send-letter-service/events","assignees_url":"https://api.github.com/repos/hmcts/send-letter-service/assignees{/user}","branches_url":"https://api.github.com/repos/hmcts/send-letter-service/branches{/branch}","tags_url":"https://api.github.com/repos/hmcts/send-letter-service/tags","blobs_url":"https://api.github.com/repos/hmcts/send-letter-service/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hmcts/send-letter-service/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hmcts/send-letter-service/git/refs{/sha}","trees_url":"https://api.github.com/repos/hmcts/send-letter-service/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hmcts/send-letter-service/statuses/{sha}","languages_url":"https://api.github.com/repos/hmcts/send-letter-service/languages","stargazers_url":"https://api.github.com/repos/hmcts/send-letter-service/stargazers","contributors_url":"https://api.github.com/repos/hmcts/send-letter-service/contributors","subscribers_url":"https://api.github.com/repos/hmcts/send-letter-service/subscribers","subscription_url":"https://api.github.com/repos/hmcts/send-letter-service/subscription","commits_url":"https://api.github.com/repos/hmcts/send-letter-service/commits{/sha}","git_commits_url":"https://api.github.com/repos/hmcts/send-letter-service/git/commits{/sha}","comments_url":"https://api.github.com/repos/hmcts/send-letter-service/comments{/number}","issue_comment_url":"https://api.github.com/repos/hmcts/send-letter-service/issues/comments{/number}","contents_url":"https://api.github.com/repos/hmcts/send-letter-service/contents/{+path}","compare_url":"https://api.github.com/repos/hmcts/send-letter-service/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hmcts/send-letter-service/merges","archive_url":"https://api.github.com/repos/hmcts/send-letter-service/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hmcts/send-letter-service/downloads","issues_url":"https://api.github.com/repos/hmcts/send-letter-service/issues{/number}","pulls_url":"https://api.github.com/repos/hmcts/send-letter-service/pulls{/number}","milestones_url":"https://api.github.com/repos/hmcts/send-letter-service/milestones{/number}","notifications_url":"https://api.github.com/repos/hmcts/send-letter-service/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hmcts/send-letter-service/labels{/name}","releases_url":"https://api.github.com/repos/hmcts/send-letter-service/releases{/id}","deployments_url":"https://api.github.com/repos/hmcts/send-letter-service/deployments","created_at":"2018-03-20T15:49:31Z","updated_at":"2018-04-06T13:24:23Z","pushed_at":"2018-04-06T14:13:45Z","git_url":"git://github.com/hmcts/send-letter-service.git","ssh_url":"git@github.com:hmcts/send-letter-service.git","clone_url":"https://github.com/hmcts/send-letter-service.git","svn_url":"https://github.com/hmcts/send-letter-service","homepage":null,"size":1336,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hmcts/send-letter-service/pulls/96"},"html":{"href":"https://github.com/hmcts/send-letter-service/pull/96"},"issue":{"href":"https://api.github.com/repos/hmcts/send-letter-service/issues/96"},"comments":{"href":"https://api.github.com/repos/hmcts/send-letter-service/issues/96/comments"},"review_comments":{"href":"https://api.github.com/repos/hmcts/send-letter-service/pulls/96/comments"},"review_comment":{"href":"https://api.github.com/repos/hmcts/send-letter-service/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hmcts/send-letter-service/pulls/96/commits"},"statuses":{"href":"https://api.github.com/repos/hmcts/send-letter-service/statuses/bede05c5b23c0ae3c8abe30c6a68453982647f84"}},"author_association":"OWNER","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"rkondratowicz","id":2472141,"avatar_url":"https://avatars2.githubusercontent.com/u/2472141?v=4","gravatar_id":"","url":"https://api.github.com/users/rkondratowicz","html_url":"https://github.com/rkondratowicz","followers_url":"https://api.github.com/users/rkondratowicz/followers","following_url":"https://api.github.com/users/rkondratowicz/following{/other_user}","gists_url":"https://api.github.com/users/rkondratowicz/gists{/gist_id}","starred_url":"https://api.github.com/users/rkondratowicz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rkondratowicz/subscriptions","organizations_url":"https://api.github.com/users/rkondratowicz/orgs","repos_url":"https://api.github.com/users/rkondratowicz/repos","events_url":"https://api.github.com/users/rkondratowicz/events{/privacy}","received_events_url":"https://api.github.com/users/rkondratowicz/received_events","type":"User","site_admin":false},"comments":1,"review_comments":9,"maintainer_can_modify":false,"commits":11,"additions":204,"deletions":58,"changed_files":11}}
{"actor":{"display_login":"rkondratowicz"}}