{"action":"created","comment":{"url":"https://api.github.com/repos/learn-co-students/oo-cash-register-web-1116/pulls/comments/90465589","pull_request_review_id":10983627,"id":90465589,"diff_hunk":"@@ -1 +1,46 @@\n+class CashRegister\n \n+  attr_accessor :total, :last_transaction\n+\n+  def initialize (discount = 0)\n+    @total = 0\n+    @discount = discount\n+    @items = []\n+  end\n+\n+  def discount\n+    @discount\n+  end\n+\n+  def add_item (title, price, quantity = 1)\n+    quantity.times do\n+      @items << title\n+    end\n+    current_transaction = price*quantity\n+    @total += current_transaction\n+    @last_transaction = current_transaction\n+  end\n+\n+  def apply_discount\n+    if discount == 0\n+      \"There is no discount to apply.\"\n+    else\n+      @total =  (@total*((100.0-discount)/100.0)).to_i\n+      \"After the discount, the total comes to $#{@total}.\"","path":"lib/cash_register.rb","position":29,"original_position":29,"commit_id":"86ddae2455a61f44a608c435b564de3c103484e8","original_commit_id":"86ddae2455a61f44a608c435b564de3c103484e8","user":{"login":"talum","id":11878752,"avatar_url":"https://avatars.githubusercontent.com/u/11878752?v=3","gravatar_id":"","url":"https://api.github.com/users/talum","html_url":"https://github.com/talum","followers_url":"https://api.github.com/users/talum/followers","following_url":"https://api.github.com/users/talum/following{/other_user}","gists_url":"https://api.github.com/users/talum/gists{/gist_id}","starred_url":"https://api.github.com/users/talum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/talum/subscriptions","organizations_url":"https://api.github.com/users/talum/orgs","repos_url":"https://api.github.com/users/talum/repos","events_url":"https://api.github.com/users/talum/events{/privacy}","received_events_url":"https://api.github.com/users/talum/received_events","type":"User","site_admin":false},"body":"It could be a good exercise to separate the modification of the total from outputting the message to comply with the single responsibility principle. ","created_at":"2016-12-01T15:12:16Z","updated_at":"2016-12-01T15:12:17Z","html_url":"https://github.com/learn-co-students/oo-cash-register-web-1116/pull/7#discussion_r90465589","pull_request_url":"https://api.github.com/repos/learn-co-students/oo-cash-register-web-1116/pulls/7","_links":{"self":{"href":"https://api.github.com/repos/learn-co-students/oo-cash-register-web-1116/pulls/comments/90465589"},"html":{"href":"https://github.com/learn-co-students/oo-cash-register-web-1116/pull/7#discussion_r90465589"},"pull_request":{"href":"https://api.github.com/repos/learn-co-students/oo-cash-register-web-1116/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/learn-co-students/oo-cash-register-web-1116/pulls/7","id":95990320,"html_url":"https://github.com/learn-co-students/oo-cash-register-web-1116/pull/7","diff_url":"https://github.com/learn-co-students/oo-cash-register-web-1116/pull/7.diff","patch_url":"https://github.com/learn-co-students/oo-cash-register-web-1116/pull/7.patch","issue_url":"https://api.github.com/repos/learn-co-students/oo-cash-register-web-1116/issues/7","number":7,"state":"open","locked":false,"title":"Lab - cash register - Kyle and Kavitoj","user":{"login":"Kighway","id":22379343,"avatar_url":"https://avatars.githubusercontent.com/u/22379343?v=3","gravatar_id":"","url":"https://api.github.com/users/Kighway","html_url":"https://github.com/Kighway","followers_url":"https://api.github.com/users/Kighway/followers","following_url":"https://api.github.com/users/Kighway/following{/other_user}","gists_url":"https://api.github.com/users/Kighway/gists{/gist_id}","starred_url":"https://api.github.com/users/Kighway/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kighway/subscriptions","organizations_url":"https://api.github.com/users/Kighway/orgs","repos_url":"https://api.github.com/users/Kighway/repos","events_url":"https://api.github.com/users/Kighway/events{/privacy}","received_events_url":"https://api.github.com/users/Kighway/received_events","type":"User","site_admin":false},"body":"team: @KavitojSingh ","created_at":"2016-11-30T22:48:37Z","updated_at":"2016-12-01T15:12:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"92a4f44613249a50419c2280cb0c223550552820","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/learn-co-students/oo-cash-register-web-1116/pulls/7/commits","review_comments_url":"https://api.github.com/repos/learn-co-students/oo-cash-register-web-1116/pulls/7/comments","review_comment_url":"https://api.github.com/repos/learn-co-students/oo-cash-register-web-1116/pulls/comments{/number}","comments_url":"https://api.github.com/repos/learn-co-students/oo-cash-register-web-1116/issues/7/comments","statuses_url":"https://api.github.com/repos/learn-co-students/oo-cash-register-web-1116/statuses/86ddae2455a61f44a608c435b564de3c103484e8","head":{"label":"Kighway:master","ref":"master","sha":"86ddae2455a61f44a608c435b564de3c103484e8","user":{"login":"Kighway","id":22379343,"avatar_url":"https://avatars.githubusercontent.com/u/22379343?v=3","gravatar_id":"","url":"https://api.github.com/users/Kighway","html_url":"https://github.com/Kighway","followers_url":"https://api.github.com/users/Kighway/followers","following_url":"https://api.github.com/users/Kighway/following{/other_user}","gists_url":"https://api.github.com/users/Kighway/gists{/gist_id}","starred_url":"https://api.github.com/users/Kighway/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kighway/subscriptions","organizations_url":"https://api.github.com/users/Kighway/orgs","repos_url":"https://api.github.com/users/Kighway/repos","events_url":"https://api.github.com/users/Kighway/events{/privacy}","received_events_url":"https://api.github.com/users/Kighway/received_events","type":"User","site_admin":false},"repo":{"id":75230004,"name":"oo-cash-register-web-1116","full_name":"Kighway/oo-cash-register-web-1116","owner":{"login":"Kighway","id":22379343,"avatar_url":"https://avatars.githubusercontent.com/u/22379343?v=3","gravatar_id":"","url":"https://api.github.com/users/Kighway","html_url":"https://github.com/Kighway","followers_url":"https://api.github.com/users/Kighway/followers","following_url":"https://api.github.com/users/Kighway/following{/other_user}","gists_url":"https://api.github.com/users/Kighway/gists{/gist_id}","starred_url":"https://api.github.com/users/Kighway/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kighway/subscriptions","organizations_url":"https://api.github.com/users/Kighway/orgs","repos_url":"https://api.github.com/users/Kighway/repos","events_url":"https://api.github.com/users/Kighway/events{/privacy}","received_events_url":"https://api.github.com/users/Kighway/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Kighway/oo-cash-register-web-1116","description":null,"fork":true,"url":"https://api.github.com/repos/Kighway/oo-cash-register-web-1116","forks_url":"https://api.github.com/repos/Kighway/oo-cash-register-web-1116/forks","keys_url":"https://api.github.com/repos/Kighway/oo-cash-register-web-1116/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Kighway/oo-cash-register-web-1116/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Kighway/oo-cash-register-web-1116/teams","hooks_url":"https://api.github.com/repos/Kighway/oo-cash-register-web-1116/hooks","issue_events_url":"https://api.github.com/repos/Kighway/oo-cash-register-web-1116/issues/events{/number}","events_url":"https://api.github.com/repos/Kighway/oo-cash-register-web-1116/events","assignees_url":"https://api.github.com/repos/Kighway/oo-cash-register-web-1116/assignees{/user}","branches_url":"https://api.github.com/repos/Kighway/oo-cash-register-web-1116/branches{/branch}","tags_url":"https://api.github.com/repos/Kighway/oo-cash-register-web-1116/tags","blobs_url":"https://api.github.com/repos/Kighway/oo-cash-register-web-1116/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Kighway/oo-cash-register-web-1116/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Kighway/oo-cash-register-web-1116/git/refs{/sha}","trees_url":"https://api.github.com/repos/Kighway/oo-cash-register-web-1116/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Kighway/oo-cash-register-web-1116/statuses/{sha}","languages_url":"https://api.github.com/repos/Kighway/oo-cash-register-web-1116/languages","stargazers_url":"https://api.github.com/repos/Kighway/oo-cash-register-web-1116/stargazers","contributors_url":"https://api.github.com/repos/Kighway/oo-cash-register-web-1116/contributors","subscribers_url":"https://api.github.com/repos/Kighway/oo-cash-register-web-1116/subscribers","subscription_url":"https://api.github.com/repos/Kighway/oo-cash-register-web-1116/subscription","commits_url":"https://api.github.com/repos/Kighway/oo-cash-register-web-1116/commits{/sha}","git_commits_url":"https://api.github.com/repos/Kighway/oo-cash-register-web-1116/git/commits{/sha}","comments_url":"https://api.github.com/repos/Kighway/oo-cash-register-web-1116/comments{/number}","issue_comment_url":"https://api.github.com/repos/Kighway/oo-cash-register-web-1116/issues/comments{/number}","contents_url":"https://api.github.com/repos/Kighway/oo-cash-register-web-1116/contents/{+path}","compare_url":"https://api.github.com/repos/Kighway/oo-cash-register-web-1116/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Kighway/oo-cash-register-web-1116/merges","archive_url":"https://api.github.com/repos/Kighway/oo-cash-register-web-1116/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Kighway/oo-cash-register-web-1116/downloads","issues_url":"https://api.github.com/repos/Kighway/oo-cash-register-web-1116/issues{/number}","pulls_url":"https://api.github.com/repos/Kighway/oo-cash-register-web-1116/pulls{/number}","milestones_url":"https://api.github.com/repos/Kighway/oo-cash-register-web-1116/milestones{/number}","notifications_url":"https://api.github.com/repos/Kighway/oo-cash-register-web-1116/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Kighway/oo-cash-register-web-1116/labels{/name}","releases_url":"https://api.github.com/repos/Kighway/oo-cash-register-web-1116/releases{/id}","deployments_url":"https://api.github.com/repos/Kighway/oo-cash-register-web-1116/deployments","created_at":"2016-11-30T21:45:33Z","updated_at":"2016-11-30T21:45:34Z","pushed_at":"2016-11-30T22:47:47Z","git_url":"git://github.com/Kighway/oo-cash-register-web-1116.git","ssh_url":"git@github.com:Kighway/oo-cash-register-web-1116.git","clone_url":"https://github.com/Kighway/oo-cash-register-web-1116.git","svn_url":"https://github.com/Kighway/oo-cash-register-web-1116","homepage":null,"size":27,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"learn-co-students:master","ref":"master","sha":"8f2590459c746d237f61f90fd85859ee8c565a0e","user":{"login":"learn-co-students","id":8825476,"avatar_url":"https://avatars.githubusercontent.com/u/8825476?v=3","gravatar_id":"","url":"https://api.github.com/users/learn-co-students","html_url":"https://github.com/learn-co-students","followers_url":"https://api.github.com/users/learn-co-students/followers","following_url":"https://api.github.com/users/learn-co-students/following{/other_user}","gists_url":"https://api.github.com/users/learn-co-students/gists{/gist_id}","starred_url":"https://api.github.com/users/learn-co-students/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/learn-co-students/subscriptions","organizations_url":"https://api.github.com/users/learn-co-students/orgs","repos_url":"https://api.github.com/users/learn-co-students/repos","events_url":"https://api.github.com/users/learn-co-students/events{/privacy}","received_events_url":"https://api.github.com/users/learn-co-students/received_events","type":"Organization","site_admin":false},"repo":{"id":75226565,"name":"oo-cash-register-web-1116","full_name":"learn-co-students/oo-cash-register-web-1116","owner":{"login":"learn-co-students","id":8825476,"avatar_url":"https://avatars.githubusercontent.com/u/8825476?v=3","gravatar_id":"","url":"https://api.github.com/users/learn-co-students","html_url":"https://github.com/learn-co-students","followers_url":"https://api.github.com/users/learn-co-students/followers","following_url":"https://api.github.com/users/learn-co-students/following{/other_user}","gists_url":"https://api.github.com/users/learn-co-students/gists{/gist_id}","starred_url":"https://api.github.com/users/learn-co-students/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/learn-co-students/subscriptions","organizations_url":"https://api.github.com/users/learn-co-students/orgs","repos_url":"https://api.github.com/users/learn-co-students/repos","events_url":"https://api.github.com/users/learn-co-students/events{/privacy}","received_events_url":"https://api.github.com/users/learn-co-students/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/learn-co-students/oo-cash-register-web-1116","description":null,"fork":false,"url":"https://api.github.com/repos/learn-co-students/oo-cash-register-web-1116","forks_url":"https://api.github.com/repos/learn-co-students/oo-cash-register-web-1116/forks","keys_url":"https://api.github.com/repos/learn-co-students/oo-cash-register-web-1116/keys{/key_id}","collaborators_url":"https://api.github.com/repos/learn-co-students/oo-cash-register-web-1116/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/learn-co-students/oo-cash-register-web-1116/teams","hooks_url":"https://api.github.com/repos/learn-co-students/oo-cash-register-web-1116/hooks","issue_events_url":"https://api.github.com/repos/learn-co-students/oo-cash-register-web-1116/issues/events{/number}","events_url":"https://api.github.com/repos/learn-co-students/oo-cash-register-web-1116/events","assignees_url":"https://api.github.com/repos/learn-co-students/oo-cash-register-web-1116/assignees{/user}","branches_url":"https://api.github.com/repos/learn-co-students/oo-cash-register-web-1116/branches{/branch}","tags_url":"https://api.github.com/repos/learn-co-students/oo-cash-register-web-1116/tags","blobs_url":"https://api.github.com/repos/learn-co-students/oo-cash-register-web-1116/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/learn-co-students/oo-cash-register-web-1116/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/learn-co-students/oo-cash-register-web-1116/git/refs{/sha}","trees_url":"https://api.github.com/repos/learn-co-students/oo-cash-register-web-1116/git/trees{/sha}","statuses_url":"https://api.github.com/repos/learn-co-students/oo-cash-register-web-1116/statuses/{sha}","languages_url":"https://api.github.com/repos/learn-co-students/oo-cash-register-web-1116/languages","stargazers_url":"https://api.github.com/repos/learn-co-students/oo-cash-register-web-1116/stargazers","contributors_url":"https://api.github.com/repos/learn-co-students/oo-cash-register-web-1116/contributors","subscribers_url":"https://api.github.com/repos/learn-co-students/oo-cash-register-web-1116/subscribers","subscription_url":"https://api.github.com/repos/learn-co-students/oo-cash-register-web-1116/subscription","commits_url":"https://api.github.com/repos/learn-co-students/oo-cash-register-web-1116/commits{/sha}","git_commits_url":"https://api.github.com/repos/learn-co-students/oo-cash-register-web-1116/git/commits{/sha}","comments_url":"https://api.github.com/repos/learn-co-students/oo-cash-register-web-1116/comments{/number}","issue_comment_url":"https://api.github.com/repos/learn-co-students/oo-cash-register-web-1116/issues/comments{/number}","contents_url":"https://api.github.com/repos/learn-co-students/oo-cash-register-web-1116/contents/{+path}","compare_url":"https://api.github.com/repos/learn-co-students/oo-cash-register-web-1116/compare/{base}...{head}","merges_url":"https://api.github.com/repos/learn-co-students/oo-cash-register-web-1116/merges","archive_url":"https://api.github.com/repos/learn-co-students/oo-cash-register-web-1116/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/learn-co-students/oo-cash-register-web-1116/downloads","issues_url":"https://api.github.com/repos/learn-co-students/oo-cash-register-web-1116/issues{/number}","pulls_url":"https://api.github.com/repos/learn-co-students/oo-cash-register-web-1116/pulls{/number}","milestones_url":"https://api.github.com/repos/learn-co-students/oo-cash-register-web-1116/milestones{/number}","notifications_url":"https://api.github.com/repos/learn-co-students/oo-cash-register-web-1116/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/learn-co-students/oo-cash-register-web-1116/labels{/name}","releases_url":"https://api.github.com/repos/learn-co-students/oo-cash-register-web-1116/releases{/id}","deployments_url":"https://api.github.com/repos/learn-co-students/oo-cash-register-web-1116/deployments","created_at":"2016-11-30T20:57:32Z","updated_at":"2016-11-30T20:57:43Z","pushed_at":"2016-12-01T14:34:20Z","git_url":"git://github.com/learn-co-students/oo-cash-register-web-1116.git","ssh_url":"git@github.com:learn-co-students/oo-cash-register-web-1116.git","clone_url":"https://github.com/learn-co-students/oo-cash-register-web-1116.git","svn_url":"https://github.com/learn-co-students/oo-cash-register-web-1116","homepage":null,"size":28,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":20,"mirror_url":null,"open_issues_count":15,"forks":20,"open_issues":15,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/learn-co-students/oo-cash-register-web-1116/pulls/7"},"html":{"href":"https://github.com/learn-co-students/oo-cash-register-web-1116/pull/7"},"issue":{"href":"https://api.github.com/repos/learn-co-students/oo-cash-register-web-1116/issues/7"},"comments":{"href":"https://api.github.com/repos/learn-co-students/oo-cash-register-web-1116/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/learn-co-students/oo-cash-register-web-1116/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/learn-co-students/oo-cash-register-web-1116/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/learn-co-students/oo-cash-register-web-1116/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/learn-co-students/oo-cash-register-web-1116/statuses/86ddae2455a61f44a608c435b564de3c103484e8"}}}}
{"actor":{"display_login":"talum"}}