{"action":"created","comment":{"url":"https://api.github.com/repos/Autumn-Martin/black_thursday/pulls/comments/206725256","pull_request_review_id":142194331,"id":206725256,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNjcyNTI1Ng==","diff_hunk":"@@ -20,27 +20,9 @@ def top_revenue_earners(number = 20)\n     end\n   end\n \n-  # def invoice_hash\n-  #   earners = {}\n-  #   group_invoices_by_merchant.each do |merchant_id, invoices|\n-  #     earners[merchant_id] = invoices.map do |invoice|\n-  #       invoice_total(invoice.id) if invoice_paid_in_full?(invoice.id)\n-  #     end.compact\n-  #   end\n-  #   earners\n-  # end\n-  def invoice_hash\n-    earners = {}\n-    group_invoices_by_merchant.each do |merchant_id, invoices|\n-      earners[merchant_id] = pull_invoices(invoices)\n-    end\n-    earners\n-  end\n-\n-  def pull_invoices(invoices)\n-    invoices.map do |invoice|\n-      invoice_total(invoice.id) if invoice_paid_in_full?(invoice.id)\n-    end.compact\n+  def sort_summed_invoice_totals(number)\n+    sorted = sum_invoice_totals.sort_by {|merchant_id, sum| sum }","path":"lib/merchant_analytics.rb","position":26,"original_position":26,"commit_id":"1754f9eca9e3b7c7daaa5078b72533e4536c9161","original_commit_id":"1754f9eca9e3b7c7daaa5078b72533e4536c9161","user":{"login":"houndci-bot","id":6697940,"node_id":"MDQ6VXNlcjY2OTc5NDA=","avatar_url":"https://avatars0.githubusercontent.com/u/6697940?v=4","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Layout/SpaceInsideBlockBraces: Space between { and | missing.<br>Lint/UnusedBlockArgument: Unused block argument - merchant_id. If it's necessary, use _ or _merchant_id as an argument name to indicate that it won't be used.","created_at":"2018-08-01T00:41:09Z","updated_at":"2018-08-01T00:41:09Z","html_url":"https://github.com/Autumn-Martin/black_thursday/pull/33#discussion_r206725256","pull_request_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/pulls/33","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/Autumn-Martin/black_thursday/pulls/comments/206725256"},"html":{"href":"https://github.com/Autumn-Martin/black_thursday/pull/33#discussion_r206725256"},"pull_request":{"href":"https://api.github.com/repos/Autumn-Martin/black_thursday/pulls/33"}}},"pull_request":{"url":"https://api.github.com/repos/Autumn-Martin/black_thursday/pulls/33","id":205279462,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA1Mjc5NDYy","html_url":"https://github.com/Autumn-Martin/black_thursday/pull/33","diff_url":"https://github.com/Autumn-Martin/black_thursday/pull/33.diff","patch_url":"https://github.com/Autumn-Martin/black_thursday/pull/33.patch","issue_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/issues/33","number":33,"state":"open","locked":false,"title":"starting iteration 4","user":{"login":"Autumn-Martin","id":36902512,"node_id":"MDQ6VXNlcjM2OTAyNTEy","avatar_url":"https://avatars2.githubusercontent.com/u/36902512?v=4","gravatar_id":"","url":"https://api.github.com/users/Autumn-Martin","html_url":"https://github.com/Autumn-Martin","followers_url":"https://api.github.com/users/Autumn-Martin/followers","following_url":"https://api.github.com/users/Autumn-Martin/following{/other_user}","gists_url":"https://api.github.com/users/Autumn-Martin/gists{/gist_id}","starred_url":"https://api.github.com/users/Autumn-Martin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Autumn-Martin/subscriptions","organizations_url":"https://api.github.com/users/Autumn-Martin/orgs","repos_url":"https://api.github.com/users/Autumn-Martin/repos","events_url":"https://api.github.com/users/Autumn-Martin/events{/privacy}","received_events_url":"https://api.github.com/users/Autumn-Martin/received_events","type":"User","site_admin":false},"body":"This reorganizes helper methods for top revenue earners. It also changes the invoice paid in full method to correct a spec harness error. We found that our assumptions of what requires an invoice paid in full to be wrong--in this case an invoice is paid in full at least one transaction is successful. It also resolves test errors due to this change. Then it adds tests and methods required for grouping merchants with pending invoices.  Lastly, it removes the test file for file loader due to a prior change of file loader from a module to a class. ","created_at":"2018-08-01T00:40:59Z","updated_at":"2018-08-01T00:41:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"319b008f885d9e41ddeca0be84ede2ae65ffb2da","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/pulls/33/commits","review_comments_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/pulls/33/comments","review_comment_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/issues/33/comments","statuses_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/statuses/1754f9eca9e3b7c7daaa5078b72533e4536c9161","head":{"label":"Autumn-Martin:redo_starting_iteration_4","ref":"redo_starting_iteration_4","sha":"1754f9eca9e3b7c7daaa5078b72533e4536c9161","user":{"login":"Autumn-Martin","id":36902512,"node_id":"MDQ6VXNlcjM2OTAyNTEy","avatar_url":"https://avatars2.githubusercontent.com/u/36902512?v=4","gravatar_id":"","url":"https://api.github.com/users/Autumn-Martin","html_url":"https://github.com/Autumn-Martin","followers_url":"https://api.github.com/users/Autumn-Martin/followers","following_url":"https://api.github.com/users/Autumn-Martin/following{/other_user}","gists_url":"https://api.github.com/users/Autumn-Martin/gists{/gist_id}","starred_url":"https://api.github.com/users/Autumn-Martin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Autumn-Martin/subscriptions","organizations_url":"https://api.github.com/users/Autumn-Martin/orgs","repos_url":"https://api.github.com/users/Autumn-Martin/repos","events_url":"https://api.github.com/users/Autumn-Martin/events{/privacy}","received_events_url":"https://api.github.com/users/Autumn-Martin/received_events","type":"User","site_admin":false},"repo":{"id":141828734,"node_id":"MDEwOlJlcG9zaXRvcnkxNDE4Mjg3MzQ=","name":"black_thursday","full_name":"Autumn-Martin/black_thursday","owner":{"login":"Autumn-Martin","id":36902512,"node_id":"MDQ6VXNlcjM2OTAyNTEy","avatar_url":"https://avatars2.githubusercontent.com/u/36902512?v=4","gravatar_id":"","url":"https://api.github.com/users/Autumn-Martin","html_url":"https://github.com/Autumn-Martin","followers_url":"https://api.github.com/users/Autumn-Martin/followers","following_url":"https://api.github.com/users/Autumn-Martin/following{/other_user}","gists_url":"https://api.github.com/users/Autumn-Martin/gists{/gist_id}","starred_url":"https://api.github.com/users/Autumn-Martin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Autumn-Martin/subscriptions","organizations_url":"https://api.github.com/users/Autumn-Martin/orgs","repos_url":"https://api.github.com/users/Autumn-Martin/repos","events_url":"https://api.github.com/users/Autumn-Martin/events{/privacy}","received_events_url":"https://api.github.com/users/Autumn-Martin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Autumn-Martin/black_thursday","description":null,"fork":true,"url":"https://api.github.com/repos/Autumn-Martin/black_thursday","forks_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/forks","keys_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/teams","hooks_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/hooks","issue_events_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/issues/events{/number}","events_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/events","assignees_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/assignees{/user}","branches_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/branches{/branch}","tags_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/tags","blobs_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/git/refs{/sha}","trees_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/statuses/{sha}","languages_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/languages","stargazers_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/stargazers","contributors_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/contributors","subscribers_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/subscribers","subscription_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/subscription","commits_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/commits{/sha}","git_commits_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/git/commits{/sha}","comments_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/comments{/number}","issue_comment_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/issues/comments{/number}","contents_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/contents/{+path}","compare_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/merges","archive_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/downloads","issues_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/issues{/number}","pulls_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/pulls{/number}","milestones_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/milestones{/number}","notifications_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/labels{/name}","releases_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/releases{/id}","deployments_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/deployments","created_at":"2018-07-21T16:25:01Z","updated_at":"2018-07-31T21:42:49Z","pushed_at":"2018-08-01T00:41:00Z","git_url":"git://github.com/Autumn-Martin/black_thursday.git","ssh_url":"git@github.com:Autumn-Martin/black_thursday.git","clone_url":"https://github.com/Autumn-Martin/black_thursday.git","svn_url":"https://github.com/Autumn-Martin/black_thursday","homepage":null,"size":1824,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"Autumn-Martin:master","ref":"master","sha":"ecd9473f8c4cddab748a4bbba688e286a2f329d6","user":{"login":"Autumn-Martin","id":36902512,"node_id":"MDQ6VXNlcjM2OTAyNTEy","avatar_url":"https://avatars2.githubusercontent.com/u/36902512?v=4","gravatar_id":"","url":"https://api.github.com/users/Autumn-Martin","html_url":"https://github.com/Autumn-Martin","followers_url":"https://api.github.com/users/Autumn-Martin/followers","following_url":"https://api.github.com/users/Autumn-Martin/following{/other_user}","gists_url":"https://api.github.com/users/Autumn-Martin/gists{/gist_id}","starred_url":"https://api.github.com/users/Autumn-Martin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Autumn-Martin/subscriptions","organizations_url":"https://api.github.com/users/Autumn-Martin/orgs","repos_url":"https://api.github.com/users/Autumn-Martin/repos","events_url":"https://api.github.com/users/Autumn-Martin/events{/privacy}","received_events_url":"https://api.github.com/users/Autumn-Martin/received_events","type":"User","site_admin":false},"repo":{"id":141828734,"node_id":"MDEwOlJlcG9zaXRvcnkxNDE4Mjg3MzQ=","name":"black_thursday","full_name":"Autumn-Martin/black_thursday","owner":{"login":"Autumn-Martin","id":36902512,"node_id":"MDQ6VXNlcjM2OTAyNTEy","avatar_url":"https://avatars2.githubusercontent.com/u/36902512?v=4","gravatar_id":"","url":"https://api.github.com/users/Autumn-Martin","html_url":"https://github.com/Autumn-Martin","followers_url":"https://api.github.com/users/Autumn-Martin/followers","following_url":"https://api.github.com/users/Autumn-Martin/following{/other_user}","gists_url":"https://api.github.com/users/Autumn-Martin/gists{/gist_id}","starred_url":"https://api.github.com/users/Autumn-Martin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Autumn-Martin/subscriptions","organizations_url":"https://api.github.com/users/Autumn-Martin/orgs","repos_url":"https://api.github.com/users/Autumn-Martin/repos","events_url":"https://api.github.com/users/Autumn-Martin/events{/privacy}","received_events_url":"https://api.github.com/users/Autumn-Martin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Autumn-Martin/black_thursday","description":null,"fork":true,"url":"https://api.github.com/repos/Autumn-Martin/black_thursday","forks_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/forks","keys_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/teams","hooks_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/hooks","issue_events_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/issues/events{/number}","events_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/events","assignees_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/assignees{/user}","branches_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/branches{/branch}","tags_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/tags","blobs_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/git/refs{/sha}","trees_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/statuses/{sha}","languages_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/languages","stargazers_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/stargazers","contributors_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/contributors","subscribers_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/subscribers","subscription_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/subscription","commits_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/commits{/sha}","git_commits_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/git/commits{/sha}","comments_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/comments{/number}","issue_comment_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/issues/comments{/number}","contents_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/contents/{+path}","compare_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/merges","archive_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/downloads","issues_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/issues{/number}","pulls_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/pulls{/number}","milestones_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/milestones{/number}","notifications_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/labels{/name}","releases_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/releases{/id}","deployments_url":"https://api.github.com/repos/Autumn-Martin/black_thursday/deployments","created_at":"2018-07-21T16:25:01Z","updated_at":"2018-07-31T21:42:49Z","pushed_at":"2018-08-01T00:41:00Z","git_url":"git://github.com/Autumn-Martin/black_thursday.git","ssh_url":"git@github.com:Autumn-Martin/black_thursday.git","clone_url":"https://github.com/Autumn-Martin/black_thursday.git","svn_url":"https://github.com/Autumn-Martin/black_thursday","homepage":null,"size":1824,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Autumn-Martin/black_thursday/pulls/33"},"html":{"href":"https://github.com/Autumn-Martin/black_thursday/pull/33"},"issue":{"href":"https://api.github.com/repos/Autumn-Martin/black_thursday/issues/33"},"comments":{"href":"https://api.github.com/repos/Autumn-Martin/black_thursday/issues/33/comments"},"review_comments":{"href":"https://api.github.com/repos/Autumn-Martin/black_thursday/pulls/33/comments"},"review_comment":{"href":"https://api.github.com/repos/Autumn-Martin/black_thursday/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Autumn-Martin/black_thursday/pulls/33/commits"},"statuses":{"href":"https://api.github.com/repos/Autumn-Martin/black_thursday/statuses/1754f9eca9e3b7c7daaa5078b72533e4536c9161"}},"author_association":"OWNER"}}
{"actor":{"display_login":"houndci-bot"}}