{"action":"closed","number":2,"pull_request":{"url":"https://api.github.com/repos/klarna/sample-app-backend/pulls/2","id":27011570,"html_url":"https://github.com/klarna/sample-app-backend/pull/2","diff_url":"https://github.com/klarna/sample-app-backend/pull/2.diff","patch_url":"https://github.com/klarna/sample-app-backend/pull/2.patch","issue_url":"https://api.github.com/repos/klarna/sample-app-backend/issues/2","number":2,"state":"closed","locked":false,"title":"Duplication for simplicity","user":{"login":"rauchy","id":289488,"avatar_url":"https://avatars.githubusercontent.com/u/289488?v=3","gravatar_id":"","url":"https://api.github.com/users/rauchy","html_url":"https://github.com/rauchy","followers_url":"https://api.github.com/users/rauchy/followers","following_url":"https://api.github.com/users/rauchy/following{/other_user}","gists_url":"https://api.github.com/users/rauchy/gists{/gist_id}","starred_url":"https://api.github.com/users/rauchy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rauchy/subscriptions","organizations_url":"https://api.github.com/users/rauchy/orgs","repos_url":"https://api.github.com/users/rauchy/repos","events_url":"https://api.github.com/users/rauchy/events{/privacy}","received_events_url":"https://api.github.com/users/rauchy/received_events","type":"User","site_admin":false},"body":"I'm dumping a few suggestions here, which you may proudly ignore. Here's the gist of what's going on:\r\n\r\n* Moved `currency` to `CATALOG`, just so people don't get the impression that they need to invent that as part of the request.\r\n* Changed `authorize_request_options` to `authorize_request`, which is more than just a name change - I separated the actual request from the meta-options (logging options)\r\n* Removed `common_options`, they are just logging options now (really there is not much sense in keeping logging options and basic auth stuff together)\r\n* Renamed `authorize_payment_response` to `authorize_response` for consistency.\r\n* Created a `capture_request`, which is basically just basic auth stuff (duplicated). It makes sense to me because you really see what is being sent. Reuse isn't really effective here.\r\n* Some cosmetic changes (parentheses, extra spaces, etc.)\r\n\r\nBesides considering these changes, I advise you to make sure the bloody thing still works, because I haven't. hah!","created_at":"2015-01-08T07:28:39Z","updated_at":"2015-01-08T08:50:43Z","closed_at":"2015-01-08T08:50:43Z","merged_at":"2015-01-08T08:50:43Z","merge_commit_sha":"5cd8265907ac6803335176bfe36b7799b2d974a0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/klarna/sample-app-backend/pulls/2/commits","review_comments_url":"https://api.github.com/repos/klarna/sample-app-backend/pulls/2/comments","review_comment_url":"https://api.github.com/repos/klarna/sample-app-backend/pulls/comments/{number}","comments_url":"https://api.github.com/repos/klarna/sample-app-backend/issues/2/comments","statuses_url":"https://api.github.com/repos/klarna/sample-app-backend/statuses/e86f502d89b9293792d12fc8af619dfce3c27b87","head":{"label":"klarna:duplication-for-simplicity","ref":"duplication-for-simplicity","sha":"e86f502d89b9293792d12fc8af619dfce3c27b87","user":{"login":"klarna","id":394540,"avatar_url":"https://avatars.githubusercontent.com/u/394540?v=3","gravatar_id":"","url":"https://api.github.com/users/klarna","html_url":"https://github.com/klarna","followers_url":"https://api.github.com/users/klarna/followers","following_url":"https://api.github.com/users/klarna/following{/other_user}","gists_url":"https://api.github.com/users/klarna/gists{/gist_id}","starred_url":"https://api.github.com/users/klarna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klarna/subscriptions","organizations_url":"https://api.github.com/users/klarna/orgs","repos_url":"https://api.github.com/users/klarna/repos","events_url":"https://api.github.com/users/klarna/events{/privacy}","received_events_url":"https://api.github.com/users/klarna/received_events","type":"Organization","site_admin":false},"repo":{"id":28405219,"name":"sample-app-backend","full_name":"klarna/sample-app-backend","owner":{"login":"klarna","id":394540,"avatar_url":"https://avatars.githubusercontent.com/u/394540?v=3","gravatar_id":"","url":"https://api.github.com/users/klarna","html_url":"https://github.com/klarna","followers_url":"https://api.github.com/users/klarna/followers","following_url":"https://api.github.com/users/klarna/following{/other_user}","gists_url":"https://api.github.com/users/klarna/gists{/gist_id}","starred_url":"https://api.github.com/users/klarna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klarna/subscriptions","organizations_url":"https://api.github.com/users/klarna/orgs","repos_url":"https://api.github.com/users/klarna/repos","events_url":"https://api.github.com/users/klarna/events{/privacy}","received_events_url":"https://api.github.com/users/klarna/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/klarna/sample-app-backend","description":"A very slim backend that facilitates purchases for an app using the Klarna on Demand SDK.","fork":false,"url":"https://api.github.com/repos/klarna/sample-app-backend","forks_url":"https://api.github.com/repos/klarna/sample-app-backend/forks","keys_url":"https://api.github.com/repos/klarna/sample-app-backend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/klarna/sample-app-backend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/klarna/sample-app-backend/teams","hooks_url":"https://api.github.com/repos/klarna/sample-app-backend/hooks","issue_events_url":"https://api.github.com/repos/klarna/sample-app-backend/issues/events{/number}","events_url":"https://api.github.com/repos/klarna/sample-app-backend/events","assignees_url":"https://api.github.com/repos/klarna/sample-app-backend/assignees{/user}","branches_url":"https://api.github.com/repos/klarna/sample-app-backend/branches{/branch}","tags_url":"https://api.github.com/repos/klarna/sample-app-backend/tags","blobs_url":"https://api.github.com/repos/klarna/sample-app-backend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/klarna/sample-app-backend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/klarna/sample-app-backend/git/refs{/sha}","trees_url":"https://api.github.com/repos/klarna/sample-app-backend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/klarna/sample-app-backend/statuses/{sha}","languages_url":"https://api.github.com/repos/klarna/sample-app-backend/languages","stargazers_url":"https://api.github.com/repos/klarna/sample-app-backend/stargazers","contributors_url":"https://api.github.com/repos/klarna/sample-app-backend/contributors","subscribers_url":"https://api.github.com/repos/klarna/sample-app-backend/subscribers","subscription_url":"https://api.github.com/repos/klarna/sample-app-backend/subscription","commits_url":"https://api.github.com/repos/klarna/sample-app-backend/commits{/sha}","git_commits_url":"https://api.github.com/repos/klarna/sample-app-backend/git/commits{/sha}","comments_url":"https://api.github.com/repos/klarna/sample-app-backend/comments{/number}","issue_comment_url":"https://api.github.com/repos/klarna/sample-app-backend/issues/comments/{number}","contents_url":"https://api.github.com/repos/klarna/sample-app-backend/contents/{+path}","compare_url":"https://api.github.com/repos/klarna/sample-app-backend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/klarna/sample-app-backend/merges","archive_url":"https://api.github.com/repos/klarna/sample-app-backend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/klarna/sample-app-backend/downloads","issues_url":"https://api.github.com/repos/klarna/sample-app-backend/issues{/number}","pulls_url":"https://api.github.com/repos/klarna/sample-app-backend/pulls{/number}","milestones_url":"https://api.github.com/repos/klarna/sample-app-backend/milestones{/number}","notifications_url":"https://api.github.com/repos/klarna/sample-app-backend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/klarna/sample-app-backend/labels{/name}","releases_url":"https://api.github.com/repos/klarna/sample-app-backend/releases{/id}","created_at":"2014-12-23T15:32:32Z","updated_at":"2015-01-07T15:40:04Z","pushed_at":"2015-01-08T08:50:43Z","git_url":"git://github.com/klarna/sample-app-backend.git","ssh_url":"git@github.com:klarna/sample-app-backend.git","clone_url":"https://github.com/klarna/sample-app-backend.git","svn_url":"https://github.com/klarna/sample-app-backend","homepage":"","size":228,"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":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"klarna:master","ref":"master","sha":"7b18f246f3060413e7499835830a9f66e2980c54","user":{"login":"klarna","id":394540,"avatar_url":"https://avatars.githubusercontent.com/u/394540?v=3","gravatar_id":"","url":"https://api.github.com/users/klarna","html_url":"https://github.com/klarna","followers_url":"https://api.github.com/users/klarna/followers","following_url":"https://api.github.com/users/klarna/following{/other_user}","gists_url":"https://api.github.com/users/klarna/gists{/gist_id}","starred_url":"https://api.github.com/users/klarna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klarna/subscriptions","organizations_url":"https://api.github.com/users/klarna/orgs","repos_url":"https://api.github.com/users/klarna/repos","events_url":"https://api.github.com/users/klarna/events{/privacy}","received_events_url":"https://api.github.com/users/klarna/received_events","type":"Organization","site_admin":false},"repo":{"id":28405219,"name":"sample-app-backend","full_name":"klarna/sample-app-backend","owner":{"login":"klarna","id":394540,"avatar_url":"https://avatars.githubusercontent.com/u/394540?v=3","gravatar_id":"","url":"https://api.github.com/users/klarna","html_url":"https://github.com/klarna","followers_url":"https://api.github.com/users/klarna/followers","following_url":"https://api.github.com/users/klarna/following{/other_user}","gists_url":"https://api.github.com/users/klarna/gists{/gist_id}","starred_url":"https://api.github.com/users/klarna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klarna/subscriptions","organizations_url":"https://api.github.com/users/klarna/orgs","repos_url":"https://api.github.com/users/klarna/repos","events_url":"https://api.github.com/users/klarna/events{/privacy}","received_events_url":"https://api.github.com/users/klarna/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/klarna/sample-app-backend","description":"A very slim backend that facilitates purchases for an app using the Klarna on Demand SDK.","fork":false,"url":"https://api.github.com/repos/klarna/sample-app-backend","forks_url":"https://api.github.com/repos/klarna/sample-app-backend/forks","keys_url":"https://api.github.com/repos/klarna/sample-app-backend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/klarna/sample-app-backend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/klarna/sample-app-backend/teams","hooks_url":"https://api.github.com/repos/klarna/sample-app-backend/hooks","issue_events_url":"https://api.github.com/repos/klarna/sample-app-backend/issues/events{/number}","events_url":"https://api.github.com/repos/klarna/sample-app-backend/events","assignees_url":"https://api.github.com/repos/klarna/sample-app-backend/assignees{/user}","branches_url":"https://api.github.com/repos/klarna/sample-app-backend/branches{/branch}","tags_url":"https://api.github.com/repos/klarna/sample-app-backend/tags","blobs_url":"https://api.github.com/repos/klarna/sample-app-backend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/klarna/sample-app-backend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/klarna/sample-app-backend/git/refs{/sha}","trees_url":"https://api.github.com/repos/klarna/sample-app-backend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/klarna/sample-app-backend/statuses/{sha}","languages_url":"https://api.github.com/repos/klarna/sample-app-backend/languages","stargazers_url":"https://api.github.com/repos/klarna/sample-app-backend/stargazers","contributors_url":"https://api.github.com/repos/klarna/sample-app-backend/contributors","subscribers_url":"https://api.github.com/repos/klarna/sample-app-backend/subscribers","subscription_url":"https://api.github.com/repos/klarna/sample-app-backend/subscription","commits_url":"https://api.github.com/repos/klarna/sample-app-backend/commits{/sha}","git_commits_url":"https://api.github.com/repos/klarna/sample-app-backend/git/commits{/sha}","comments_url":"https://api.github.com/repos/klarna/sample-app-backend/comments{/number}","issue_comment_url":"https://api.github.com/repos/klarna/sample-app-backend/issues/comments/{number}","contents_url":"https://api.github.com/repos/klarna/sample-app-backend/contents/{+path}","compare_url":"https://api.github.com/repos/klarna/sample-app-backend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/klarna/sample-app-backend/merges","archive_url":"https://api.github.com/repos/klarna/sample-app-backend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/klarna/sample-app-backend/downloads","issues_url":"https://api.github.com/repos/klarna/sample-app-backend/issues{/number}","pulls_url":"https://api.github.com/repos/klarna/sample-app-backend/pulls{/number}","milestones_url":"https://api.github.com/repos/klarna/sample-app-backend/milestones{/number}","notifications_url":"https://api.github.com/repos/klarna/sample-app-backend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/klarna/sample-app-backend/labels{/name}","releases_url":"https://api.github.com/repos/klarna/sample-app-backend/releases{/id}","created_at":"2014-12-23T15:32:32Z","updated_at":"2015-01-07T15:40:04Z","pushed_at":"2015-01-08T08:50:43Z","git_url":"git://github.com/klarna/sample-app-backend.git","ssh_url":"git@github.com:klarna/sample-app-backend.git","clone_url":"https://github.com/klarna/sample-app-backend.git","svn_url":"https://github.com/klarna/sample-app-backend","homepage":"","size":228,"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":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/klarna/sample-app-backend/pulls/2"},"html":{"href":"https://github.com/klarna/sample-app-backend/pull/2"},"issue":{"href":"https://api.github.com/repos/klarna/sample-app-backend/issues/2"},"comments":{"href":"https://api.github.com/repos/klarna/sample-app-backend/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/klarna/sample-app-backend/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/klarna/sample-app-backend/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/klarna/sample-app-backend/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/klarna/sample-app-backend/statuses/e86f502d89b9293792d12fc8af619dfce3c27b87"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"grozen","id":1166903,"avatar_url":"https://avatars.githubusercontent.com/u/1166903?v=3","gravatar_id":"","url":"https://api.github.com/users/grozen","html_url":"https://github.com/grozen","followers_url":"https://api.github.com/users/grozen/followers","following_url":"https://api.github.com/users/grozen/following{/other_user}","gists_url":"https://api.github.com/users/grozen/gists{/gist_id}","starred_url":"https://api.github.com/users/grozen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grozen/subscriptions","organizations_url":"https://api.github.com/users/grozen/orgs","repos_url":"https://api.github.com/users/grozen/repos","events_url":"https://api.github.com/users/grozen/events{/privacy}","received_events_url":"https://api.github.com/users/grozen/received_events","type":"User","site_admin":false},"comments":2,"review_comments":2,"commits":6,"additions":19,"deletions":16,"changed_files":2}}