{"action":"created","comment":{"url":"https://api.github.com/repos/hbellows/black_thursday/pulls/comments/205977686","pull_request_review_id":141351064,"id":205977686,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNTk3NzY4Ng==","diff_hunk":"@@ -208,11 +208,80 @@ def invoice_status(status)\n     invoices = @se.invoices.all.count\n     by_status = @se.invoices.find_all_by_status(status).count\n     ((by_status / invoices.to_f) * 100).round(2)\n+   end\n+  end\n+\n+def find_invoice(invoice_id)\n+    selected = []\n+    @se.invoices.all.each do |invoice|\n+      if invoice.id == invoice_id\n+        selected << invoice\n+      end\n+    end\n+    return selected\n+  end\n+\n+  def invoice_paid_in_full?(invoice_id)\n+    invoice = find_invoice(invoice_id)\n+    result = []\n+    @se.transactions.all.each do |transaction|\n+      if transaction.invoice_id == invoice_id\n+        result << transaction\n+      end\n+    end\n+    if result[0].result == \"success\"\n+      true\n+    else\n+      false\n+    end\n+  end\n+\n+  def invoice_total(invoice)\n+    selected = []\n+    @se.invoice_items.all.each do |invoice_item|\n+      if invoice_item.invoice_id == invoice\n+        selcted << invoice_item\n+      end\n+    end\n+    return selected\n   end\n-end\n \n #-------------------ITERATION THREE------------------------------------\n-#Please put your iteration three methods here\n+def find_invoice(invoice_id)\n+    selected = []\n+    @se.invoices.all.each do |invoice|\n+      if invoice.id == invoice_id\n+        selected << invoice\n+      end\n+    end\n+    return selected\n+  end\n+\n+  def invoice_paid_in_full?(invoice_id)\n+    invoice = find_invoice(invoice_id)","path":"lib/sales_analyst.rb","position":18,"original_position":56,"commit_id":"219d8c84ec3f2c5dfcd7ed3b99cdc1abec68dcb8","original_commit_id":"219d8c84ec3f2c5dfcd7ed3b99cdc1abec68dcb8","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":"Lint/UselessAssignment: Useless assignment to variable - invoice. Did you mean invoice_id?","created_at":"2018-07-29T15:15:42Z","updated_at":"2018-07-29T15:15:43Z","html_url":"https://github.com/hbellows/black_thursday/pull/71#discussion_r205977686","pull_request_url":"https://api.github.com/repos/hbellows/black_thursday/pulls/71","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/hbellows/black_thursday/pulls/comments/205977686"},"html":{"href":"https://github.com/hbellows/black_thursday/pull/71#discussion_r205977686"},"pull_request":{"href":"https://api.github.com/repos/hbellows/black_thursday/pulls/71"}}},"pull_request":{"url":"https://api.github.com/repos/hbellows/black_thursday/pulls/71","id":204646618,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA0NjQ2NjE4","html_url":"https://github.com/hbellows/black_thursday/pull/71","diff_url":"https://github.com/hbellows/black_thursday/pull/71.diff","patch_url":"https://github.com/hbellows/black_thursday/pull/71.patch","issue_url":"https://api.github.com/repos/hbellows/black_thursday/issues/71","number":71,"state":"open","locked":false,"title":"working invoice paid in full (i think i'm getting the paid/unpaid fro…","user":{"login":"patmccartney2","id":30877651,"node_id":"MDQ6VXNlcjMwODc3NjUx","avatar_url":"https://avatars1.githubusercontent.com/u/30877651?v=4","gravatar_id":"","url":"https://api.github.com/users/patmccartney2","html_url":"https://github.com/patmccartney2","followers_url":"https://api.github.com/users/patmccartney2/followers","following_url":"https://api.github.com/users/patmccartney2/following{/other_user}","gists_url":"https://api.github.com/users/patmccartney2/gists{/gist_id}","starred_url":"https://api.github.com/users/patmccartney2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patmccartney2/subscriptions","organizations_url":"https://api.github.com/users/patmccartney2/orgs","repos_url":"https://api.github.com/users/patmccartney2/repos","events_url":"https://api.github.com/users/patmccartney2/events{/privacy}","received_events_url":"https://api.github.com/users/patmccartney2/received_events","type":"User","site_admin":false},"body":"…m the right place.  started working on invoice paid in full and getting a no implicit conversion of nil into string","created_at":"2018-07-29T15:09:16Z","updated_at":"2018-07-29T15:15:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ec8e47ad7b78d16db905d1afddb48a975699f9c4","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/hbellows/black_thursday/pulls/71/commits","review_comments_url":"https://api.github.com/repos/hbellows/black_thursday/pulls/71/comments","review_comment_url":"https://api.github.com/repos/hbellows/black_thursday/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hbellows/black_thursday/issues/71/comments","statuses_url":"https://api.github.com/repos/hbellows/black_thursday/statuses/219d8c84ec3f2c5dfcd7ed3b99cdc1abec68dcb8","head":{"label":"hbellows:sales_analyst_12","ref":"sales_analyst_12","sha":"219d8c84ec3f2c5dfcd7ed3b99cdc1abec68dcb8","user":{"login":"hbellows","id":35637783,"node_id":"MDQ6VXNlcjM1NjM3Nzgz","avatar_url":"https://avatars2.githubusercontent.com/u/35637783?v=4","gravatar_id":"","url":"https://api.github.com/users/hbellows","html_url":"https://github.com/hbellows","followers_url":"https://api.github.com/users/hbellows/followers","following_url":"https://api.github.com/users/hbellows/following{/other_user}","gists_url":"https://api.github.com/users/hbellows/gists{/gist_id}","starred_url":"https://api.github.com/users/hbellows/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hbellows/subscriptions","organizations_url":"https://api.github.com/users/hbellows/orgs","repos_url":"https://api.github.com/users/hbellows/repos","events_url":"https://api.github.com/users/hbellows/events{/privacy}","received_events_url":"https://api.github.com/users/hbellows/received_events","type":"User","site_admin":false},"repo":{"id":141752686,"node_id":"MDEwOlJlcG9zaXRvcnkxNDE3NTI2ODY=","name":"black_thursday","full_name":"hbellows/black_thursday","owner":{"login":"hbellows","id":35637783,"node_id":"MDQ6VXNlcjM1NjM3Nzgz","avatar_url":"https://avatars2.githubusercontent.com/u/35637783?v=4","gravatar_id":"","url":"https://api.github.com/users/hbellows","html_url":"https://github.com/hbellows","followers_url":"https://api.github.com/users/hbellows/followers","following_url":"https://api.github.com/users/hbellows/following{/other_user}","gists_url":"https://api.github.com/users/hbellows/gists{/gist_id}","starred_url":"https://api.github.com/users/hbellows/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hbellows/subscriptions","organizations_url":"https://api.github.com/users/hbellows/orgs","repos_url":"https://api.github.com/users/hbellows/repos","events_url":"https://api.github.com/users/hbellows/events{/privacy}","received_events_url":"https://api.github.com/users/hbellows/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hbellows/black_thursday","description":null,"fork":true,"url":"https://api.github.com/repos/hbellows/black_thursday","forks_url":"https://api.github.com/repos/hbellows/black_thursday/forks","keys_url":"https://api.github.com/repos/hbellows/black_thursday/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hbellows/black_thursday/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hbellows/black_thursday/teams","hooks_url":"https://api.github.com/repos/hbellows/black_thursday/hooks","issue_events_url":"https://api.github.com/repos/hbellows/black_thursday/issues/events{/number}","events_url":"https://api.github.com/repos/hbellows/black_thursday/events","assignees_url":"https://api.github.com/repos/hbellows/black_thursday/assignees{/user}","branches_url":"https://api.github.com/repos/hbellows/black_thursday/branches{/branch}","tags_url":"https://api.github.com/repos/hbellows/black_thursday/tags","blobs_url":"https://api.github.com/repos/hbellows/black_thursday/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hbellows/black_thursday/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hbellows/black_thursday/git/refs{/sha}","trees_url":"https://api.github.com/repos/hbellows/black_thursday/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hbellows/black_thursday/statuses/{sha}","languages_url":"https://api.github.com/repos/hbellows/black_thursday/languages","stargazers_url":"https://api.github.com/repos/hbellows/black_thursday/stargazers","contributors_url":"https://api.github.com/repos/hbellows/black_thursday/contributors","subscribers_url":"https://api.github.com/repos/hbellows/black_thursday/subscribers","subscription_url":"https://api.github.com/repos/hbellows/black_thursday/subscription","commits_url":"https://api.github.com/repos/hbellows/black_thursday/commits{/sha}","git_commits_url":"https://api.github.com/repos/hbellows/black_thursday/git/commits{/sha}","comments_url":"https://api.github.com/repos/hbellows/black_thursday/comments{/number}","issue_comment_url":"https://api.github.com/repos/hbellows/black_thursday/issues/comments{/number}","contents_url":"https://api.github.com/repos/hbellows/black_thursday/contents/{+path}","compare_url":"https://api.github.com/repos/hbellows/black_thursday/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hbellows/black_thursday/merges","archive_url":"https://api.github.com/repos/hbellows/black_thursday/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hbellows/black_thursday/downloads","issues_url":"https://api.github.com/repos/hbellows/black_thursday/issues{/number}","pulls_url":"https://api.github.com/repos/hbellows/black_thursday/pulls{/number}","milestones_url":"https://api.github.com/repos/hbellows/black_thursday/milestones{/number}","notifications_url":"https://api.github.com/repos/hbellows/black_thursday/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hbellows/black_thursday/labels{/name}","releases_url":"https://api.github.com/repos/hbellows/black_thursday/releases{/id}","deployments_url":"https://api.github.com/repos/hbellows/black_thursday/deployments","created_at":"2018-07-20T19:59:40Z","updated_at":"2018-07-29T04:14:03Z","pushed_at":"2018-07-29T15:15:32Z","git_url":"git://github.com/hbellows/black_thursday.git","ssh_url":"git@github.com:hbellows/black_thursday.git","clone_url":"https://github.com/hbellows/black_thursday.git","svn_url":"https://github.com/hbellows/black_thursday","homepage":null,"size":1846,"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":"hbellows:master","ref":"master","sha":"014d8a28351d9ad45c4449926723c392fe6b5e4c","user":{"login":"hbellows","id":35637783,"node_id":"MDQ6VXNlcjM1NjM3Nzgz","avatar_url":"https://avatars2.githubusercontent.com/u/35637783?v=4","gravatar_id":"","url":"https://api.github.com/users/hbellows","html_url":"https://github.com/hbellows","followers_url":"https://api.github.com/users/hbellows/followers","following_url":"https://api.github.com/users/hbellows/following{/other_user}","gists_url":"https://api.github.com/users/hbellows/gists{/gist_id}","starred_url":"https://api.github.com/users/hbellows/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hbellows/subscriptions","organizations_url":"https://api.github.com/users/hbellows/orgs","repos_url":"https://api.github.com/users/hbellows/repos","events_url":"https://api.github.com/users/hbellows/events{/privacy}","received_events_url":"https://api.github.com/users/hbellows/received_events","type":"User","site_admin":false},"repo":{"id":141752686,"node_id":"MDEwOlJlcG9zaXRvcnkxNDE3NTI2ODY=","name":"black_thursday","full_name":"hbellows/black_thursday","owner":{"login":"hbellows","id":35637783,"node_id":"MDQ6VXNlcjM1NjM3Nzgz","avatar_url":"https://avatars2.githubusercontent.com/u/35637783?v=4","gravatar_id":"","url":"https://api.github.com/users/hbellows","html_url":"https://github.com/hbellows","followers_url":"https://api.github.com/users/hbellows/followers","following_url":"https://api.github.com/users/hbellows/following{/other_user}","gists_url":"https://api.github.com/users/hbellows/gists{/gist_id}","starred_url":"https://api.github.com/users/hbellows/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hbellows/subscriptions","organizations_url":"https://api.github.com/users/hbellows/orgs","repos_url":"https://api.github.com/users/hbellows/repos","events_url":"https://api.github.com/users/hbellows/events{/privacy}","received_events_url":"https://api.github.com/users/hbellows/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hbellows/black_thursday","description":null,"fork":true,"url":"https://api.github.com/repos/hbellows/black_thursday","forks_url":"https://api.github.com/repos/hbellows/black_thursday/forks","keys_url":"https://api.github.com/repos/hbellows/black_thursday/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hbellows/black_thursday/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hbellows/black_thursday/teams","hooks_url":"https://api.github.com/repos/hbellows/black_thursday/hooks","issue_events_url":"https://api.github.com/repos/hbellows/black_thursday/issues/events{/number}","events_url":"https://api.github.com/repos/hbellows/black_thursday/events","assignees_url":"https://api.github.com/repos/hbellows/black_thursday/assignees{/user}","branches_url":"https://api.github.com/repos/hbellows/black_thursday/branches{/branch}","tags_url":"https://api.github.com/repos/hbellows/black_thursday/tags","blobs_url":"https://api.github.com/repos/hbellows/black_thursday/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hbellows/black_thursday/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hbellows/black_thursday/git/refs{/sha}","trees_url":"https://api.github.com/repos/hbellows/black_thursday/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hbellows/black_thursday/statuses/{sha}","languages_url":"https://api.github.com/repos/hbellows/black_thursday/languages","stargazers_url":"https://api.github.com/repos/hbellows/black_thursday/stargazers","contributors_url":"https://api.github.com/repos/hbellows/black_thursday/contributors","subscribers_url":"https://api.github.com/repos/hbellows/black_thursday/subscribers","subscription_url":"https://api.github.com/repos/hbellows/black_thursday/subscription","commits_url":"https://api.github.com/repos/hbellows/black_thursday/commits{/sha}","git_commits_url":"https://api.github.com/repos/hbellows/black_thursday/git/commits{/sha}","comments_url":"https://api.github.com/repos/hbellows/black_thursday/comments{/number}","issue_comment_url":"https://api.github.com/repos/hbellows/black_thursday/issues/comments{/number}","contents_url":"https://api.github.com/repos/hbellows/black_thursday/contents/{+path}","compare_url":"https://api.github.com/repos/hbellows/black_thursday/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hbellows/black_thursday/merges","archive_url":"https://api.github.com/repos/hbellows/black_thursday/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hbellows/black_thursday/downloads","issues_url":"https://api.github.com/repos/hbellows/black_thursday/issues{/number}","pulls_url":"https://api.github.com/repos/hbellows/black_thursday/pulls{/number}","milestones_url":"https://api.github.com/repos/hbellows/black_thursday/milestones{/number}","notifications_url":"https://api.github.com/repos/hbellows/black_thursday/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hbellows/black_thursday/labels{/name}","releases_url":"https://api.github.com/repos/hbellows/black_thursday/releases{/id}","deployments_url":"https://api.github.com/repos/hbellows/black_thursday/deployments","created_at":"2018-07-20T19:59:40Z","updated_at":"2018-07-29T04:14:03Z","pushed_at":"2018-07-29T15:15:32Z","git_url":"git://github.com/hbellows/black_thursday.git","ssh_url":"git@github.com:hbellows/black_thursday.git","clone_url":"https://github.com/hbellows/black_thursday.git","svn_url":"https://github.com/hbellows/black_thursday","homepage":null,"size":1846,"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/hbellows/black_thursday/pulls/71"},"html":{"href":"https://github.com/hbellows/black_thursday/pull/71"},"issue":{"href":"https://api.github.com/repos/hbellows/black_thursday/issues/71"},"comments":{"href":"https://api.github.com/repos/hbellows/black_thursday/issues/71/comments"},"review_comments":{"href":"https://api.github.com/repos/hbellows/black_thursday/pulls/71/comments"},"review_comment":{"href":"https://api.github.com/repos/hbellows/black_thursday/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hbellows/black_thursday/pulls/71/commits"},"statuses":{"href":"https://api.github.com/repos/hbellows/black_thursday/statuses/219d8c84ec3f2c5dfcd7ed3b99cdc1abec68dcb8"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"houndci-bot"}}