{"action":"created","comment":{"url":"https://api.github.com/repos/Baby-com-br/fake-braspag/pulls/comments/45659392","id":45659392,"diff_hunk":"@@ -2,7 +2,9 @@ module FakeBraspag\n   class Sales < Sinatra::Base\n     get '/:PaymentId' do\n       if ResponseToggler.enabled?('get_sale')\n-        jbuilder :get_sale\n+        order = Order.find!(params[:PaymentId])\n+        @sale = SalePresenter.new(order)\n+        jbuilder order.PaymentMethod == 'CreditCard' ? :get_credit_card_sale : :get_boleto_sale","path":"lib/fake_braspag/sales.rb","position":7,"original_position":7,"commit_id":"4f2a13c93d182321fb4a8546a74565fb4eb85acd","original_commit_id":"4f2a13c93d182321fb4a8546a74565fb4eb85acd","user":{"login":"pmatiello","id":46062,"avatar_url":"https://avatars.githubusercontent.com/u/46062?v=3","gravatar_id":"","url":"https://api.github.com/users/pmatiello","html_url":"https://github.com/pmatiello","followers_url":"https://api.github.com/users/pmatiello/followers","following_url":"https://api.github.com/users/pmatiello/following{/other_user}","gists_url":"https://api.github.com/users/pmatiello/gists{/gist_id}","starred_url":"https://api.github.com/users/pmatiello/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmatiello/subscriptions","organizations_url":"https://api.github.com/users/pmatiello/orgs","repos_url":"https://api.github.com/users/pmatiello/repos","events_url":"https://api.github.com/users/pmatiello/events{/privacy}","received_events_url":"https://api.github.com/users/pmatiello/received_events","type":"User","site_admin":false},"body":"```ruby\r\njbuilder METHOD_SPECIFIC[order.PaymentMethod][:views][:find]\r\n```","created_at":"2015-11-23T20:57:35Z","updated_at":"2015-11-23T20:57:35Z","html_url":"https://github.com/Baby-com-br/fake-braspag/pull/24#discussion_r45659392","pull_request_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/pulls/24","_links":{"self":{"href":"https://api.github.com/repos/Baby-com-br/fake-braspag/pulls/comments/45659392"},"html":{"href":"https://github.com/Baby-com-br/fake-braspag/pull/24#discussion_r45659392"},"pull_request":{"href":"https://api.github.com/repos/Baby-com-br/fake-braspag/pulls/24"}}},"pull_request":{"url":"https://api.github.com/repos/Baby-com-br/fake-braspag/pulls/24","id":51572065,"html_url":"https://github.com/Baby-com-br/fake-braspag/pull/24","diff_url":"https://github.com/Baby-com-br/fake-braspag/pull/24.diff","patch_url":"https://github.com/Baby-com-br/fake-braspag/pull/24.patch","issue_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/issues/24","number":24,"state":"open","locked":false,"title":"Add support to sale and get information to orders paid with boleto","user":{"login":"bvicenzo","id":173159,"avatar_url":"https://avatars.githubusercontent.com/u/173159?v=3","gravatar_id":"","url":"https://api.github.com/users/bvicenzo","html_url":"https://github.com/bvicenzo","followers_url":"https://api.github.com/users/bvicenzo/followers","following_url":"https://api.github.com/users/bvicenzo/following{/other_user}","gists_url":"https://api.github.com/users/bvicenzo/gists{/gist_id}","starred_url":"https://api.github.com/users/bvicenzo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bvicenzo/subscriptions","organizations_url":"https://api.github.com/users/bvicenzo/orgs","repos_url":"https://api.github.com/users/bvicenzo/repos","events_url":"https://api.github.com/users/bvicenzo/events{/privacy}","received_events_url":"https://api.github.com/users/bvicenzo/received_events","type":"User","site_admin":false},"body":"This PR introduces changes at sales creation and sales details.\r\nThis allows us to create and search orders paid with boleto.","created_at":"2015-11-23T19:58:43Z","updated_at":"2015-11-23T20:57:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"173435b680754cbcfda4f0f6c7d19e187295b625","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/pulls/24/commits","review_comments_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/pulls/24/comments","review_comment_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/issues/24/comments","statuses_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/statuses/4f2a13c93d182321fb4a8546a74565fb4eb85acd","head":{"label":"Baby-com-br:bv-boleto-in-sales-endpoint","ref":"bv-boleto-in-sales-endpoint","sha":"4f2a13c93d182321fb4a8546a74565fb4eb85acd","user":{"login":"Baby-com-br","id":1762272,"avatar_url":"https://avatars.githubusercontent.com/u/1762272?v=3","gravatar_id":"","url":"https://api.github.com/users/Baby-com-br","html_url":"https://github.com/Baby-com-br","followers_url":"https://api.github.com/users/Baby-com-br/followers","following_url":"https://api.github.com/users/Baby-com-br/following{/other_user}","gists_url":"https://api.github.com/users/Baby-com-br/gists{/gist_id}","starred_url":"https://api.github.com/users/Baby-com-br/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Baby-com-br/subscriptions","organizations_url":"https://api.github.com/users/Baby-com-br/orgs","repos_url":"https://api.github.com/users/Baby-com-br/repos","events_url":"https://api.github.com/users/Baby-com-br/events{/privacy}","received_events_url":"https://api.github.com/users/Baby-com-br/received_events","type":"Organization","site_admin":false},"repo":{"id":11319630,"name":"fake-braspag","full_name":"Baby-com-br/fake-braspag","owner":{"login":"Baby-com-br","id":1762272,"avatar_url":"https://avatars.githubusercontent.com/u/1762272?v=3","gravatar_id":"","url":"https://api.github.com/users/Baby-com-br","html_url":"https://github.com/Baby-com-br","followers_url":"https://api.github.com/users/Baby-com-br/followers","following_url":"https://api.github.com/users/Baby-com-br/following{/other_user}","gists_url":"https://api.github.com/users/Baby-com-br/gists{/gist_id}","starred_url":"https://api.github.com/users/Baby-com-br/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Baby-com-br/subscriptions","organizations_url":"https://api.github.com/users/Baby-com-br/orgs","repos_url":"https://api.github.com/users/Baby-com-br/repos","events_url":"https://api.github.com/users/Baby-com-br/events{/privacy}","received_events_url":"https://api.github.com/users/Baby-com-br/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Baby-com-br/fake-braspag","description":"","fork":true,"url":"https://api.github.com/repos/Baby-com-br/fake-braspag","forks_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/forks","keys_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/teams","hooks_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/hooks","issue_events_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/issues/events{/number}","events_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/events","assignees_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/assignees{/user}","branches_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/branches{/branch}","tags_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/tags","blobs_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/git/refs{/sha}","trees_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/statuses/{sha}","languages_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/languages","stargazers_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/stargazers","contributors_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/contributors","subscribers_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/subscribers","subscription_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/subscription","commits_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/commits{/sha}","git_commits_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/git/commits{/sha}","comments_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/comments{/number}","issue_comment_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/issues/comments{/number}","contents_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/contents/{+path}","compare_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/merges","archive_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/downloads","issues_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/issues{/number}","pulls_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/pulls{/number}","milestones_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/milestones{/number}","notifications_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/labels{/name}","releases_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/releases{/id}","created_at":"2013-07-10T18:01:20Z","updated_at":"2015-09-23T22:23:00Z","pushed_at":"2015-11-23T19:58:43Z","git_url":"git://github.com/Baby-com-br/fake-braspag.git","ssh_url":"git@github.com:Baby-com-br/fake-braspag.git","clone_url":"https://github.com/Baby-com-br/fake-braspag.git","svn_url":"https://github.com/Baby-com-br/fake-braspag","homepage":"","size":166,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":false,"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":2,"default_branch":"master"}},"base":{"label":"Baby-com-br:master","ref":"master","sha":"e5fa4e9d037c1e1be3c4f3eac9b8fc22b6aec174","user":{"login":"Baby-com-br","id":1762272,"avatar_url":"https://avatars.githubusercontent.com/u/1762272?v=3","gravatar_id":"","url":"https://api.github.com/users/Baby-com-br","html_url":"https://github.com/Baby-com-br","followers_url":"https://api.github.com/users/Baby-com-br/followers","following_url":"https://api.github.com/users/Baby-com-br/following{/other_user}","gists_url":"https://api.github.com/users/Baby-com-br/gists{/gist_id}","starred_url":"https://api.github.com/users/Baby-com-br/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Baby-com-br/subscriptions","organizations_url":"https://api.github.com/users/Baby-com-br/orgs","repos_url":"https://api.github.com/users/Baby-com-br/repos","events_url":"https://api.github.com/users/Baby-com-br/events{/privacy}","received_events_url":"https://api.github.com/users/Baby-com-br/received_events","type":"Organization","site_admin":false},"repo":{"id":11319630,"name":"fake-braspag","full_name":"Baby-com-br/fake-braspag","owner":{"login":"Baby-com-br","id":1762272,"avatar_url":"https://avatars.githubusercontent.com/u/1762272?v=3","gravatar_id":"","url":"https://api.github.com/users/Baby-com-br","html_url":"https://github.com/Baby-com-br","followers_url":"https://api.github.com/users/Baby-com-br/followers","following_url":"https://api.github.com/users/Baby-com-br/following{/other_user}","gists_url":"https://api.github.com/users/Baby-com-br/gists{/gist_id}","starred_url":"https://api.github.com/users/Baby-com-br/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Baby-com-br/subscriptions","organizations_url":"https://api.github.com/users/Baby-com-br/orgs","repos_url":"https://api.github.com/users/Baby-com-br/repos","events_url":"https://api.github.com/users/Baby-com-br/events{/privacy}","received_events_url":"https://api.github.com/users/Baby-com-br/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Baby-com-br/fake-braspag","description":"","fork":true,"url":"https://api.github.com/repos/Baby-com-br/fake-braspag","forks_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/forks","keys_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/teams","hooks_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/hooks","issue_events_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/issues/events{/number}","events_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/events","assignees_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/assignees{/user}","branches_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/branches{/branch}","tags_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/tags","blobs_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/git/refs{/sha}","trees_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/statuses/{sha}","languages_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/languages","stargazers_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/stargazers","contributors_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/contributors","subscribers_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/subscribers","subscription_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/subscription","commits_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/commits{/sha}","git_commits_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/git/commits{/sha}","comments_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/comments{/number}","issue_comment_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/issues/comments{/number}","contents_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/contents/{+path}","compare_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/merges","archive_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/downloads","issues_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/issues{/number}","pulls_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/pulls{/number}","milestones_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/milestones{/number}","notifications_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/labels{/name}","releases_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/releases{/id}","created_at":"2013-07-10T18:01:20Z","updated_at":"2015-09-23T22:23:00Z","pushed_at":"2015-11-23T19:58:43Z","git_url":"git://github.com/Baby-com-br/fake-braspag.git","ssh_url":"git@github.com:Baby-com-br/fake-braspag.git","clone_url":"https://github.com/Baby-com-br/fake-braspag.git","svn_url":"https://github.com/Baby-com-br/fake-braspag","homepage":"","size":166,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":false,"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":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Baby-com-br/fake-braspag/pulls/24"},"html":{"href":"https://github.com/Baby-com-br/fake-braspag/pull/24"},"issue":{"href":"https://api.github.com/repos/Baby-com-br/fake-braspag/issues/24"},"comments":{"href":"https://api.github.com/repos/Baby-com-br/fake-braspag/issues/24/comments"},"review_comments":{"href":"https://api.github.com/repos/Baby-com-br/fake-braspag/pulls/24/comments"},"review_comment":{"href":"https://api.github.com/repos/Baby-com-br/fake-braspag/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Baby-com-br/fake-braspag/pulls/24/commits"},"statuses":{"href":"https://api.github.com/repos/Baby-com-br/fake-braspag/statuses/4f2a13c93d182321fb4a8546a74565fb4eb85acd"}}}}