{"action":"created","comment":{"url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/pulls/comments/44001522","id":44001522,"diff_hunk":"@@ -35,5 +36,8 @@ def generate_refund_file(request):\n     client = api_client.get_connection(request)\n     client.bank_admin.transactions.patch(refunded_transactions)\n \n+    # create file record\n+    post_new_file(request, 'ACCESSPAY', [t['id'] for t in refunded_transactions])","path":"mtp_bank_admin/apps/bank_admin/refund.py","position":24,"original_position":24,"commit_id":"b0ba3b50cd51d5ed7d6225a8b6fe858cad6b89fa","original_commit_id":"b0ba3b50cd51d5ed7d6225a8b6fe858cad6b89fa","user":{"login":"SteveMarshall","id":2210,"avatar_url":"https://avatars.githubusercontent.com/u/2210?v=3","gravatar_id":"","url":"https://api.github.com/users/SteveMarshall","html_url":"https://github.com/SteveMarshall","followers_url":"https://api.github.com/users/SteveMarshall/followers","following_url":"https://api.github.com/users/SteveMarshall/following{/other_user}","gists_url":"https://api.github.com/users/SteveMarshall/gists{/gist_id}","starred_url":"https://api.github.com/users/SteveMarshall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SteveMarshall/subscriptions","organizations_url":"https://api.github.com/users/SteveMarshall/orgs","repos_url":"https://api.github.com/users/SteveMarshall/repos","events_url":"https://api.github.com/users/SteveMarshall/events{/privacy}","received_events_url":"https://api.github.com/users/SteveMarshall/received_events","type":"User","site_admin":false},"body":"(To be clear: I'm suggesting that we use that generic term in the DB/API, and that the bank admin app is responsible for knowing that, at this moment in time, the format a “refund journal” should be downloadable as is an ADI. Does that make sense?)","created_at":"2015-11-05T11:27:06Z","updated_at":"2015-11-05T11:27:06Z","html_url":"https://github.com/ministryofjustice/money-to-prisoners-bank-admin/pull/28#discussion_r44001522","pull_request_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/pulls/28","_links":{"self":{"href":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/pulls/comments/44001522"},"html":{"href":"https://github.com/ministryofjustice/money-to-prisoners-bank-admin/pull/28#discussion_r44001522"},"pull_request":{"href":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/pulls/28"}}},"pull_request":{"url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/pulls/28","id":49717658,"html_url":"https://github.com/ministryofjustice/money-to-prisoners-bank-admin/pull/28","diff_url":"https://github.com/ministryofjustice/money-to-prisoners-bank-admin/pull/28.diff","patch_url":"https://github.com/ministryofjustice/money-to-prisoners-bank-admin/pull/28.patch","issue_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/issues/28","number":28,"state":"open","locked":false,"title":"Cause new file records to be created on download","user":{"login":"ibrechin","id":733442,"avatar_url":"https://avatars.githubusercontent.com/u/733442?v=3","gravatar_id":"","url":"https://api.github.com/users/ibrechin","html_url":"https://github.com/ibrechin","followers_url":"https://api.github.com/users/ibrechin/followers","following_url":"https://api.github.com/users/ibrechin/following{/other_user}","gists_url":"https://api.github.com/users/ibrechin/gists{/gist_id}","starred_url":"https://api.github.com/users/ibrechin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ibrechin/subscriptions","organizations_url":"https://api.github.com/users/ibrechin/orgs","repos_url":"https://api.github.com/users/ibrechin/repos","events_url":"https://api.github.com/users/ibrechin/events{/privacy}","received_events_url":"https://api.github.com/users/ibrechin/received_events","type":"User","site_admin":false},"body":"This also removes usage of the 'reconciled' field as the end\r\nfunctionality of this field can be replicated using the file\r\nrecords.\r\n\r\nDepends on https://github.com/ministryofjustice/money-to-prisoners-api/pull/59","created_at":"2015-11-04T17:16:32Z","updated_at":"2015-11-05T11:27:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dc8ff5ed55fae7098c416b728afea397008d7986","assignee":{"login":"ushkarev","id":911238,"avatar_url":"https://avatars.githubusercontent.com/u/911238?v=3","gravatar_id":"","url":"https://api.github.com/users/ushkarev","html_url":"https://github.com/ushkarev","followers_url":"https://api.github.com/users/ushkarev/followers","following_url":"https://api.github.com/users/ushkarev/following{/other_user}","gists_url":"https://api.github.com/users/ushkarev/gists{/gist_id}","starred_url":"https://api.github.com/users/ushkarev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ushkarev/subscriptions","organizations_url":"https://api.github.com/users/ushkarev/orgs","repos_url":"https://api.github.com/users/ushkarev/repos","events_url":"https://api.github.com/users/ushkarev/events{/privacy}","received_events_url":"https://api.github.com/users/ushkarev/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/pulls/28/commits","review_comments_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/pulls/28/comments","review_comment_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/issues/28/comments","statuses_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/statuses/b0ba3b50cd51d5ed7d6225a8b6fe858cad6b89fa","head":{"label":"ministryofjustice:utilise-api-file-tracking","ref":"utilise-api-file-tracking","sha":"b0ba3b50cd51d5ed7d6225a8b6fe858cad6b89fa","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":40470925,"name":"money-to-prisoners-bank-admin","full_name":"ministryofjustice/money-to-prisoners-bank-admin","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/money-to-prisoners-bank-admin","description":"Bank admin front-end for Money To Prisoners","fork":false,"url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin","forks_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/forks","keys_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/teams","hooks_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/hooks","issue_events_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/issues/events{/number}","events_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/events","assignees_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/assignees{/user}","branches_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/branches{/branch}","tags_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/tags","blobs_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/git/refs{/sha}","trees_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/statuses/{sha}","languages_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/languages","stargazers_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/stargazers","contributors_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/contributors","subscribers_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/subscribers","subscription_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/subscription","commits_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/commits{/sha}","git_commits_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/git/commits{/sha}","comments_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/comments{/number}","issue_comment_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/issues/comments{/number}","contents_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/contents/{+path}","compare_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/merges","archive_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/downloads","issues_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/issues{/number}","pulls_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/pulls{/number}","milestones_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/milestones{/number}","notifications_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/labels{/name}","releases_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/releases{/id}","created_at":"2015-08-10T08:13:03Z","updated_at":"2015-08-13T13:57:53Z","pushed_at":"2015-11-05T10:47:39Z","git_url":"git://github.com/ministryofjustice/money-to-prisoners-bank-admin.git","ssh_url":"git@github.com:ministryofjustice/money-to-prisoners-bank-admin.git","clone_url":"https://github.com/ministryofjustice/money-to-prisoners-bank-admin.git","svn_url":"https://github.com/ministryofjustice/money-to-prisoners-bank-admin","homepage":null,"size":696,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"907f64c2c8d4948db6898f145ab5a2a3fc73a35d","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":40470925,"name":"money-to-prisoners-bank-admin","full_name":"ministryofjustice/money-to-prisoners-bank-admin","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/money-to-prisoners-bank-admin","description":"Bank admin front-end for Money To Prisoners","fork":false,"url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin","forks_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/forks","keys_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/teams","hooks_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/hooks","issue_events_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/issues/events{/number}","events_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/events","assignees_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/assignees{/user}","branches_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/branches{/branch}","tags_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/tags","blobs_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/git/refs{/sha}","trees_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/statuses/{sha}","languages_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/languages","stargazers_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/stargazers","contributors_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/contributors","subscribers_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/subscribers","subscription_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/subscription","commits_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/commits{/sha}","git_commits_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/git/commits{/sha}","comments_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/comments{/number}","issue_comment_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/issues/comments{/number}","contents_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/contents/{+path}","compare_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/merges","archive_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/downloads","issues_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/issues{/number}","pulls_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/pulls{/number}","milestones_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/milestones{/number}","notifications_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/labels{/name}","releases_url":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/releases{/id}","created_at":"2015-08-10T08:13:03Z","updated_at":"2015-08-13T13:57:53Z","pushed_at":"2015-11-05T10:47:39Z","git_url":"git://github.com/ministryofjustice/money-to-prisoners-bank-admin.git","ssh_url":"git@github.com:ministryofjustice/money-to-prisoners-bank-admin.git","clone_url":"https://github.com/ministryofjustice/money-to-prisoners-bank-admin.git","svn_url":"https://github.com/ministryofjustice/money-to-prisoners-bank-admin","homepage":null,"size":696,"stargazers_count":0,"watchers_count":0,"language":"Python","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/money-to-prisoners-bank-admin/pulls/28"},"html":{"href":"https://github.com/ministryofjustice/money-to-prisoners-bank-admin/pull/28"},"issue":{"href":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/issues/28"},"comments":{"href":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/issues/28/comments"},"review_comments":{"href":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/pulls/28/comments"},"review_comment":{"href":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/pulls/28/commits"},"statuses":{"href":"https://api.github.com/repos/ministryofjustice/money-to-prisoners-bank-admin/statuses/b0ba3b50cd51d5ed7d6225a8b6fe858cad6b89fa"}}}}