{"action":"created","comment":{"url":"https://api.github.com/repos/pwentz/rails_engine/pulls/comments/77916145","id":77916145,"diff_hunk":"@@ -44,4 +50,21 @@ def customers_with_pending_invoices\n       unsuccessful).\n       distinct\n   end\n+\n+  def revenue_on_date(date)\n+    number_with_precision(\n+    invoices.\n+      where(\n+      'invoices.created_at >= ? AND '\\\n+      'invoices.created_at <= ?',\n+      date.beginning_of_day,\n+      date.end_of_day).","path":"app/models/merchant.rb","position":38,"original_position":38,"commit_id":"a2d3981707b37ffa837f26aa9333fad1e4550399","original_commit_id":"a2d3981707b37ffa837f26aa9333fad1e4550399","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","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":"Closing method call brace must be on the line after the last argument when opening brace is on a separate line from the first argument.","created_at":"2016-09-07T22:27:44Z","updated_at":"2016-09-07T22:27:44Z","html_url":"https://github.com/pwentz/rails_engine/pull/53#discussion_r77916145","pull_request_url":"https://api.github.com/repos/pwentz/rails_engine/pulls/53","_links":{"self":{"href":"https://api.github.com/repos/pwentz/rails_engine/pulls/comments/77916145"},"html":{"href":"https://github.com/pwentz/rails_engine/pull/53#discussion_r77916145"},"pull_request":{"href":"https://api.github.com/repos/pwentz/rails_engine/pulls/53"}}},"pull_request":{"url":"https://api.github.com/repos/pwentz/rails_engine/pulls/53","id":84383809,"html_url":"https://github.com/pwentz/rails_engine/pull/53","diff_url":"https://github.com/pwentz/rails_engine/pull/53.diff","patch_url":"https://github.com/pwentz/rails_engine/pull/53.patch","issue_url":"https://api.github.com/repos/pwentz/rails_engine/issues/53","number":53,"state":"open","locked":false,"title":"close #21 business endpoint for single merchant revenue on date.","user":{"login":"pwentz","id":18466392,"avatar_url":"https://avatars.githubusercontent.com/u/18466392?v=3","gravatar_id":"","url":"https://api.github.com/users/pwentz","html_url":"https://github.com/pwentz","followers_url":"https://api.github.com/users/pwentz/followers","following_url":"https://api.github.com/users/pwentz/following{/other_user}","gists_url":"https://api.github.com/users/pwentz/gists{/gist_id}","starred_url":"https://api.github.com/users/pwentz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pwentz/subscriptions","organizations_url":"https://api.github.com/users/pwentz/orgs","repos_url":"https://api.github.com/users/pwentz/repos","events_url":"https://api.github.com/users/pwentz/events{/privacy}","received_events_url":"https://api.github.com/users/pwentz/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-09-07T22:18:05Z","updated_at":"2016-09-07T22:27:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"219294ba8ae2705634204469b9338543472206f8","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/pwentz/rails_engine/pulls/53/commits","review_comments_url":"https://api.github.com/repos/pwentz/rails_engine/pulls/53/comments","review_comment_url":"https://api.github.com/repos/pwentz/rails_engine/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pwentz/rails_engine/issues/53/comments","statuses_url":"https://api.github.com/repos/pwentz/rails_engine/statuses/a2d3981707b37ffa837f26aa9333fad1e4550399","head":{"label":"pwentz:21_business_endpoint_single_merchant_revenue_by_date","ref":"21_business_endpoint_single_merchant_revenue_by_date","sha":"a2d3981707b37ffa837f26aa9333fad1e4550399","user":{"login":"pwentz","id":18466392,"avatar_url":"https://avatars.githubusercontent.com/u/18466392?v=3","gravatar_id":"","url":"https://api.github.com/users/pwentz","html_url":"https://github.com/pwentz","followers_url":"https://api.github.com/users/pwentz/followers","following_url":"https://api.github.com/users/pwentz/following{/other_user}","gists_url":"https://api.github.com/users/pwentz/gists{/gist_id}","starred_url":"https://api.github.com/users/pwentz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pwentz/subscriptions","organizations_url":"https://api.github.com/users/pwentz/orgs","repos_url":"https://api.github.com/users/pwentz/repos","events_url":"https://api.github.com/users/pwentz/events{/privacy}","received_events_url":"https://api.github.com/users/pwentz/received_events","type":"User","site_admin":false},"repo":{"id":67433339,"name":"rails_engine","full_name":"pwentz/rails_engine","owner":{"login":"pwentz","id":18466392,"avatar_url":"https://avatars.githubusercontent.com/u/18466392?v=3","gravatar_id":"","url":"https://api.github.com/users/pwentz","html_url":"https://github.com/pwentz","followers_url":"https://api.github.com/users/pwentz/followers","following_url":"https://api.github.com/users/pwentz/following{/other_user}","gists_url":"https://api.github.com/users/pwentz/gists{/gist_id}","starred_url":"https://api.github.com/users/pwentz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pwentz/subscriptions","organizations_url":"https://api.github.com/users/pwentz/orgs","repos_url":"https://api.github.com/users/pwentz/repos","events_url":"https://api.github.com/users/pwentz/events{/privacy}","received_events_url":"https://api.github.com/users/pwentz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pwentz/rails_engine","description":"Turing - Mod 3 (Week 4) Pair project","fork":false,"url":"https://api.github.com/repos/pwentz/rails_engine","forks_url":"https://api.github.com/repos/pwentz/rails_engine/forks","keys_url":"https://api.github.com/repos/pwentz/rails_engine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pwentz/rails_engine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pwentz/rails_engine/teams","hooks_url":"https://api.github.com/repos/pwentz/rails_engine/hooks","issue_events_url":"https://api.github.com/repos/pwentz/rails_engine/issues/events{/number}","events_url":"https://api.github.com/repos/pwentz/rails_engine/events","assignees_url":"https://api.github.com/repos/pwentz/rails_engine/assignees{/user}","branches_url":"https://api.github.com/repos/pwentz/rails_engine/branches{/branch}","tags_url":"https://api.github.com/repos/pwentz/rails_engine/tags","blobs_url":"https://api.github.com/repos/pwentz/rails_engine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pwentz/rails_engine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pwentz/rails_engine/git/refs{/sha}","trees_url":"https://api.github.com/repos/pwentz/rails_engine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pwentz/rails_engine/statuses/{sha}","languages_url":"https://api.github.com/repos/pwentz/rails_engine/languages","stargazers_url":"https://api.github.com/repos/pwentz/rails_engine/stargazers","contributors_url":"https://api.github.com/repos/pwentz/rails_engine/contributors","subscribers_url":"https://api.github.com/repos/pwentz/rails_engine/subscribers","subscription_url":"https://api.github.com/repos/pwentz/rails_engine/subscription","commits_url":"https://api.github.com/repos/pwentz/rails_engine/commits{/sha}","git_commits_url":"https://api.github.com/repos/pwentz/rails_engine/git/commits{/sha}","comments_url":"https://api.github.com/repos/pwentz/rails_engine/comments{/number}","issue_comment_url":"https://api.github.com/repos/pwentz/rails_engine/issues/comments{/number}","contents_url":"https://api.github.com/repos/pwentz/rails_engine/contents/{+path}","compare_url":"https://api.github.com/repos/pwentz/rails_engine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pwentz/rails_engine/merges","archive_url":"https://api.github.com/repos/pwentz/rails_engine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pwentz/rails_engine/downloads","issues_url":"https://api.github.com/repos/pwentz/rails_engine/issues{/number}","pulls_url":"https://api.github.com/repos/pwentz/rails_engine/pulls{/number}","milestones_url":"https://api.github.com/repos/pwentz/rails_engine/milestones{/number}","notifications_url":"https://api.github.com/repos/pwentz/rails_engine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pwentz/rails_engine/labels{/name}","releases_url":"https://api.github.com/repos/pwentz/rails_engine/releases{/id}","deployments_url":"https://api.github.com/repos/pwentz/rails_engine/deployments","created_at":"2016-09-05T15:49:34Z","updated_at":"2016-09-05T17:37:17Z","pushed_at":"2016-09-07T22:27:35Z","git_url":"git://github.com/pwentz/rails_engine.git","ssh_url":"git@github.com:pwentz/rails_engine.git","clone_url":"https://github.com/pwentz/rails_engine.git","svn_url":"https://github.com/pwentz/rails_engine","homepage":"https://github.com/turingschool/lesson_plans/blob/master/ruby_03-professional_rails_applications/rails_engine.md","size":87,"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":9,"forks":0,"open_issues":9,"watchers":0,"default_branch":"develop"}},"base":{"label":"pwentz:develop","ref":"develop","sha":"0168fc5714e3bb320a91c06740952009383c9c47","user":{"login":"pwentz","id":18466392,"avatar_url":"https://avatars.githubusercontent.com/u/18466392?v=3","gravatar_id":"","url":"https://api.github.com/users/pwentz","html_url":"https://github.com/pwentz","followers_url":"https://api.github.com/users/pwentz/followers","following_url":"https://api.github.com/users/pwentz/following{/other_user}","gists_url":"https://api.github.com/users/pwentz/gists{/gist_id}","starred_url":"https://api.github.com/users/pwentz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pwentz/subscriptions","organizations_url":"https://api.github.com/users/pwentz/orgs","repos_url":"https://api.github.com/users/pwentz/repos","events_url":"https://api.github.com/users/pwentz/events{/privacy}","received_events_url":"https://api.github.com/users/pwentz/received_events","type":"User","site_admin":false},"repo":{"id":67433339,"name":"rails_engine","full_name":"pwentz/rails_engine","owner":{"login":"pwentz","id":18466392,"avatar_url":"https://avatars.githubusercontent.com/u/18466392?v=3","gravatar_id":"","url":"https://api.github.com/users/pwentz","html_url":"https://github.com/pwentz","followers_url":"https://api.github.com/users/pwentz/followers","following_url":"https://api.github.com/users/pwentz/following{/other_user}","gists_url":"https://api.github.com/users/pwentz/gists{/gist_id}","starred_url":"https://api.github.com/users/pwentz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pwentz/subscriptions","organizations_url":"https://api.github.com/users/pwentz/orgs","repos_url":"https://api.github.com/users/pwentz/repos","events_url":"https://api.github.com/users/pwentz/events{/privacy}","received_events_url":"https://api.github.com/users/pwentz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pwentz/rails_engine","description":"Turing - Mod 3 (Week 4) Pair project","fork":false,"url":"https://api.github.com/repos/pwentz/rails_engine","forks_url":"https://api.github.com/repos/pwentz/rails_engine/forks","keys_url":"https://api.github.com/repos/pwentz/rails_engine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pwentz/rails_engine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pwentz/rails_engine/teams","hooks_url":"https://api.github.com/repos/pwentz/rails_engine/hooks","issue_events_url":"https://api.github.com/repos/pwentz/rails_engine/issues/events{/number}","events_url":"https://api.github.com/repos/pwentz/rails_engine/events","assignees_url":"https://api.github.com/repos/pwentz/rails_engine/assignees{/user}","branches_url":"https://api.github.com/repos/pwentz/rails_engine/branches{/branch}","tags_url":"https://api.github.com/repos/pwentz/rails_engine/tags","blobs_url":"https://api.github.com/repos/pwentz/rails_engine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pwentz/rails_engine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pwentz/rails_engine/git/refs{/sha}","trees_url":"https://api.github.com/repos/pwentz/rails_engine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pwentz/rails_engine/statuses/{sha}","languages_url":"https://api.github.com/repos/pwentz/rails_engine/languages","stargazers_url":"https://api.github.com/repos/pwentz/rails_engine/stargazers","contributors_url":"https://api.github.com/repos/pwentz/rails_engine/contributors","subscribers_url":"https://api.github.com/repos/pwentz/rails_engine/subscribers","subscription_url":"https://api.github.com/repos/pwentz/rails_engine/subscription","commits_url":"https://api.github.com/repos/pwentz/rails_engine/commits{/sha}","git_commits_url":"https://api.github.com/repos/pwentz/rails_engine/git/commits{/sha}","comments_url":"https://api.github.com/repos/pwentz/rails_engine/comments{/number}","issue_comment_url":"https://api.github.com/repos/pwentz/rails_engine/issues/comments{/number}","contents_url":"https://api.github.com/repos/pwentz/rails_engine/contents/{+path}","compare_url":"https://api.github.com/repos/pwentz/rails_engine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pwentz/rails_engine/merges","archive_url":"https://api.github.com/repos/pwentz/rails_engine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pwentz/rails_engine/downloads","issues_url":"https://api.github.com/repos/pwentz/rails_engine/issues{/number}","pulls_url":"https://api.github.com/repos/pwentz/rails_engine/pulls{/number}","milestones_url":"https://api.github.com/repos/pwentz/rails_engine/milestones{/number}","notifications_url":"https://api.github.com/repos/pwentz/rails_engine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pwentz/rails_engine/labels{/name}","releases_url":"https://api.github.com/repos/pwentz/rails_engine/releases{/id}","deployments_url":"https://api.github.com/repos/pwentz/rails_engine/deployments","created_at":"2016-09-05T15:49:34Z","updated_at":"2016-09-05T17:37:17Z","pushed_at":"2016-09-07T22:27:35Z","git_url":"git://github.com/pwentz/rails_engine.git","ssh_url":"git@github.com:pwentz/rails_engine.git","clone_url":"https://github.com/pwentz/rails_engine.git","svn_url":"https://github.com/pwentz/rails_engine","homepage":"https://github.com/turingschool/lesson_plans/blob/master/ruby_03-professional_rails_applications/rails_engine.md","size":87,"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":9,"forks":0,"open_issues":9,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/pwentz/rails_engine/pulls/53"},"html":{"href":"https://github.com/pwentz/rails_engine/pull/53"},"issue":{"href":"https://api.github.com/repos/pwentz/rails_engine/issues/53"},"comments":{"href":"https://api.github.com/repos/pwentz/rails_engine/issues/53/comments"},"review_comments":{"href":"https://api.github.com/repos/pwentz/rails_engine/pulls/53/comments"},"review_comment":{"href":"https://api.github.com/repos/pwentz/rails_engine/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pwentz/rails_engine/pulls/53/commits"},"statuses":{"href":"https://api.github.com/repos/pwentz/rails_engine/statuses/a2d3981707b37ffa837f26aa9333fad1e4550399"}}}}
{"actor":{"display_login":"houndci-bot"}}