{"action":"created","comment":{"url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/pulls/comments/31371078","id":31371078,"diff_hunk":"@@ -0,0 +1,41 @@\n+module BankAccount\n+  class SavingsAccount < Account\n+\n+    attr_accessor :id, :balance\n+\n+    #Savings Accounts need to be opened with a minimum of $10. If an attempt to open\n+    #an account with less than that occurs, ArgumentError needs to be raised and\n+    #program should not continue running\n+    def initialize (id, initial_balance)\n+      if initial_balance < 10\n+        raise ArgumentError, 'You cannot open a Savings Account with less than $10'\n+      end\n+      @id = id\n+      @balance = initial_balance\n+    end\n+\n+    #A minimum of 10 must be in the account at all times, this would include after\n+    #the $2 fee has been assessed. So the block should not execute if, after processing\n+    #the transaction and the fee, this will leave the balance less than 10. And an error\n+    #message will appear.\n+    def withdraw(amount)\n+      if @balance - amount < 12\n+        print \"This transaction cannot be completed because you don't have enough money to maintain your minimum balance.\"\n+        return @balance\n+      end\n+      @balance = @balance - amount - 2\n+      return @balance\n+    end\n+\n+    #This will calculate the interest on the balance and needs to return the amount\n+    #of interest and not the new amount with interest. If you call the balance method\n+    #it should have the new total with the balance as well. interest needs to be entered\n+    #with a 0.XX format.\n+    def add_interest(rate)\n+      interest = @balance * rate/100","path":"lib/bank_account/savings_account.rb","position":35,"original_position":35,"commit_id":"e083371f1bec4c82783bad2fd8bf8bc967ecf09c","original_commit_id":"e083371f1bec4c82783bad2fd8bf8bc967ecf09c","user":{"login":"davidmfoley","id":128350,"avatar_url":"https://avatars.githubusercontent.com/u/128350?v=3","gravatar_id":"","url":"https://api.github.com/users/davidmfoley","html_url":"https://github.com/davidmfoley","followers_url":"https://api.github.com/users/davidmfoley/followers","following_url":"https://api.github.com/users/davidmfoley/following{/other_user}","gists_url":"https://api.github.com/users/davidmfoley/gists{/gist_id}","starred_url":"https://api.github.com/users/davidmfoley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidmfoley/subscriptions","organizations_url":"https://api.github.com/users/davidmfoley/orgs","repos_url":"https://api.github.com/users/davidmfoley/repos","events_url":"https://api.github.com/users/davidmfoley/events{/privacy}","received_events_url":"https://api.github.com/users/davidmfoley/received_events","type":"User","site_admin":false},"body":"Minor note: The order of operations here is different from what is implied by the spacing on the line --  it is like:\r\n```ruby\r\n(@balance * rate) / 100\r\n```\r\n\r\n... not like: \r\n```ruby\r\n@balance * (rate / 100)\r\n```","created_at":"2015-05-29T22:40:53Z","updated_at":"2015-05-29T22:40:53Z","html_url":"https://github.com/Ada-Developers-Academy/C3Projects--BankAccounts/pull/1#discussion_r31371078","pull_request_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/pulls/comments/31371078"},"html":{"href":"https://github.com/Ada-Developers-Academy/C3Projects--BankAccounts/pull/1#discussion_r31371078"},"pull_request":{"href":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/pulls/1","id":36549222,"html_url":"https://github.com/Ada-Developers-Academy/C3Projects--BankAccounts/pull/1","diff_url":"https://github.com/Ada-Developers-Academy/C3Projects--BankAccounts/pull/1.diff","patch_url":"https://github.com/Ada-Developers-Academy/C3Projects--BankAccounts/pull/1.patch","issue_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/issues/1","number":1,"state":"open","locked":false,"title":"Completed Lunch Attempt for Bank Accounts","user":{"login":"MisShellyMac","id":10933427,"avatar_url":"https://avatars.githubusercontent.com/u/10933427?v=3","gravatar_id":"","url":"https://api.github.com/users/MisShellyMac","html_url":"https://github.com/MisShellyMac","followers_url":"https://api.github.com/users/MisShellyMac/followers","following_url":"https://api.github.com/users/MisShellyMac/following{/other_user}","gists_url":"https://api.github.com/users/MisShellyMac/gists{/gist_id}","starred_url":"https://api.github.com/users/MisShellyMac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MisShellyMac/subscriptions","organizations_url":"https://api.github.com/users/MisShellyMac/orgs","repos_url":"https://api.github.com/users/MisShellyMac/repos","events_url":"https://api.github.com/users/MisShellyMac/events{/privacy}","received_events_url":"https://api.github.com/users/MisShellyMac/received_events","type":"User","site_admin":false},"body":"One note: letting a user do a check that takes the account to a -10 balance is allowed and then the $2 fee is assessed letting the account total be $-12. This is the only case where it is allowed to be less than the required $10. This is my completed Lunch attempt. Specs did pass as green when I tested. Thanks!","created_at":"2015-05-29T22:04:41Z","updated_at":"2015-05-29T22:40:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a2eda1b7c74de4ac1b3857dea333d8ea8861e2bd","assignee":{"login":"GreyKn","id":2430394,"avatar_url":"https://avatars.githubusercontent.com/u/2430394?v=3","gravatar_id":"","url":"https://api.github.com/users/GreyKn","html_url":"https://github.com/GreyKn","followers_url":"https://api.github.com/users/GreyKn/followers","following_url":"https://api.github.com/users/GreyKn/following{/other_user}","gists_url":"https://api.github.com/users/GreyKn/gists{/gist_id}","starred_url":"https://api.github.com/users/GreyKn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GreyKn/subscriptions","organizations_url":"https://api.github.com/users/GreyKn/orgs","repos_url":"https://api.github.com/users/GreyKn/repos","events_url":"https://api.github.com/users/GreyKn/events{/privacy}","received_events_url":"https://api.github.com/users/GreyKn/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/pulls/1/commits","review_comments_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/pulls/1/comments","review_comment_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/issues/1/comments","statuses_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/statuses/e083371f1bec4c82783bad2fd8bf8bc967ecf09c","head":{"label":"MisShellyMac:mjm/master","ref":"mjm/master","sha":"e083371f1bec4c82783bad2fd8bf8bc967ecf09c","user":{"login":"MisShellyMac","id":10933427,"avatar_url":"https://avatars.githubusercontent.com/u/10933427?v=3","gravatar_id":"","url":"https://api.github.com/users/MisShellyMac","html_url":"https://github.com/MisShellyMac","followers_url":"https://api.github.com/users/MisShellyMac/followers","following_url":"https://api.github.com/users/MisShellyMac/following{/other_user}","gists_url":"https://api.github.com/users/MisShellyMac/gists{/gist_id}","starred_url":"https://api.github.com/users/MisShellyMac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MisShellyMac/subscriptions","organizations_url":"https://api.github.com/users/MisShellyMac/orgs","repos_url":"https://api.github.com/users/MisShellyMac/repos","events_url":"https://api.github.com/users/MisShellyMac/events{/privacy}","received_events_url":"https://api.github.com/users/MisShellyMac/received_events","type":"User","site_admin":false},"repo":{"id":36467573,"name":"C3Projects--BankAccounts","full_name":"MisShellyMac/C3Projects--BankAccounts","owner":{"login":"MisShellyMac","id":10933427,"avatar_url":"https://avatars.githubusercontent.com/u/10933427?v=3","gravatar_id":"","url":"https://api.github.com/users/MisShellyMac","html_url":"https://github.com/MisShellyMac","followers_url":"https://api.github.com/users/MisShellyMac/followers","following_url":"https://api.github.com/users/MisShellyMac/following{/other_user}","gists_url":"https://api.github.com/users/MisShellyMac/gists{/gist_id}","starred_url":"https://api.github.com/users/MisShellyMac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MisShellyMac/subscriptions","organizations_url":"https://api.github.com/users/MisShellyMac/orgs","repos_url":"https://api.github.com/users/MisShellyMac/repos","events_url":"https://api.github.com/users/MisShellyMac/events{/privacy}","received_events_url":"https://api.github.com/users/MisShellyMac/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MisShellyMac/C3Projects--BankAccounts","description":"","fork":true,"url":"https://api.github.com/repos/MisShellyMac/C3Projects--BankAccounts","forks_url":"https://api.github.com/repos/MisShellyMac/C3Projects--BankAccounts/forks","keys_url":"https://api.github.com/repos/MisShellyMac/C3Projects--BankAccounts/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MisShellyMac/C3Projects--BankAccounts/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MisShellyMac/C3Projects--BankAccounts/teams","hooks_url":"https://api.github.com/repos/MisShellyMac/C3Projects--BankAccounts/hooks","issue_events_url":"https://api.github.com/repos/MisShellyMac/C3Projects--BankAccounts/issues/events{/number}","events_url":"https://api.github.com/repos/MisShellyMac/C3Projects--BankAccounts/events","assignees_url":"https://api.github.com/repos/MisShellyMac/C3Projects--BankAccounts/assignees{/user}","branches_url":"https://api.github.com/repos/MisShellyMac/C3Projects--BankAccounts/branches{/branch}","tags_url":"https://api.github.com/repos/MisShellyMac/C3Projects--BankAccounts/tags","blobs_url":"https://api.github.com/repos/MisShellyMac/C3Projects--BankAccounts/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MisShellyMac/C3Projects--BankAccounts/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MisShellyMac/C3Projects--BankAccounts/git/refs{/sha}","trees_url":"https://api.github.com/repos/MisShellyMac/C3Projects--BankAccounts/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MisShellyMac/C3Projects--BankAccounts/statuses/{sha}","languages_url":"https://api.github.com/repos/MisShellyMac/C3Projects--BankAccounts/languages","stargazers_url":"https://api.github.com/repos/MisShellyMac/C3Projects--BankAccounts/stargazers","contributors_url":"https://api.github.com/repos/MisShellyMac/C3Projects--BankAccounts/contributors","subscribers_url":"https://api.github.com/repos/MisShellyMac/C3Projects--BankAccounts/subscribers","subscription_url":"https://api.github.com/repos/MisShellyMac/C3Projects--BankAccounts/subscription","commits_url":"https://api.github.com/repos/MisShellyMac/C3Projects--BankAccounts/commits{/sha}","git_commits_url":"https://api.github.com/repos/MisShellyMac/C3Projects--BankAccounts/git/commits{/sha}","comments_url":"https://api.github.com/repos/MisShellyMac/C3Projects--BankAccounts/comments{/number}","issue_comment_url":"https://api.github.com/repos/MisShellyMac/C3Projects--BankAccounts/issues/comments{/number}","contents_url":"https://api.github.com/repos/MisShellyMac/C3Projects--BankAccounts/contents/{+path}","compare_url":"https://api.github.com/repos/MisShellyMac/C3Projects--BankAccounts/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MisShellyMac/C3Projects--BankAccounts/merges","archive_url":"https://api.github.com/repos/MisShellyMac/C3Projects--BankAccounts/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MisShellyMac/C3Projects--BankAccounts/downloads","issues_url":"https://api.github.com/repos/MisShellyMac/C3Projects--BankAccounts/issues{/number}","pulls_url":"https://api.github.com/repos/MisShellyMac/C3Projects--BankAccounts/pulls{/number}","milestones_url":"https://api.github.com/repos/MisShellyMac/C3Projects--BankAccounts/milestones{/number}","notifications_url":"https://api.github.com/repos/MisShellyMac/C3Projects--BankAccounts/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MisShellyMac/C3Projects--BankAccounts/labels{/name}","releases_url":"https://api.github.com/repos/MisShellyMac/C3Projects--BankAccounts/releases{/id}","created_at":"2015-05-28T21:38:31Z","updated_at":"2015-05-28T21:16:52Z","pushed_at":"2015-05-29T22:00:28Z","git_url":"git://github.com/MisShellyMac/C3Projects--BankAccounts.git","ssh_url":"git@github.com:MisShellyMac/C3Projects--BankAccounts.git","clone_url":"https://github.com/MisShellyMac/C3Projects--BankAccounts.git","svn_url":"https://github.com/MisShellyMac/C3Projects--BankAccounts","homepage":null,"size":95,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"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":"Ada-Developers-Academy:mjm/master","ref":"mjm/master","sha":"3a0aaa59072e6ea61da0e80405816fbca27f2def","user":{"login":"Ada-Developers-Academy","id":4689715,"avatar_url":"https://avatars.githubusercontent.com/u/4689715?v=3","gravatar_id":"","url":"https://api.github.com/users/Ada-Developers-Academy","html_url":"https://github.com/Ada-Developers-Academy","followers_url":"https://api.github.com/users/Ada-Developers-Academy/followers","following_url":"https://api.github.com/users/Ada-Developers-Academy/following{/other_user}","gists_url":"https://api.github.com/users/Ada-Developers-Academy/gists{/gist_id}","starred_url":"https://api.github.com/users/Ada-Developers-Academy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ada-Developers-Academy/subscriptions","organizations_url":"https://api.github.com/users/Ada-Developers-Academy/orgs","repos_url":"https://api.github.com/users/Ada-Developers-Academy/repos","events_url":"https://api.github.com/users/Ada-Developers-Academy/events{/privacy}","received_events_url":"https://api.github.com/users/Ada-Developers-Academy/received_events","type":"Organization","site_admin":false},"repo":{"id":36466643,"name":"C3Projects--BankAccounts","full_name":"Ada-Developers-Academy/C3Projects--BankAccounts","owner":{"login":"Ada-Developers-Academy","id":4689715,"avatar_url":"https://avatars.githubusercontent.com/u/4689715?v=3","gravatar_id":"","url":"https://api.github.com/users/Ada-Developers-Academy","html_url":"https://github.com/Ada-Developers-Academy","followers_url":"https://api.github.com/users/Ada-Developers-Academy/followers","following_url":"https://api.github.com/users/Ada-Developers-Academy/following{/other_user}","gists_url":"https://api.github.com/users/Ada-Developers-Academy/gists{/gist_id}","starred_url":"https://api.github.com/users/Ada-Developers-Academy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ada-Developers-Academy/subscriptions","organizations_url":"https://api.github.com/users/Ada-Developers-Academy/orgs","repos_url":"https://api.github.com/users/Ada-Developers-Academy/repos","events_url":"https://api.github.com/users/Ada-Developers-Academy/events{/privacy}","received_events_url":"https://api.github.com/users/Ada-Developers-Academy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Ada-Developers-Academy/C3Projects--BankAccounts","description":"","fork":false,"url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts","forks_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/forks","keys_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/teams","hooks_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/hooks","issue_events_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/issues/events{/number}","events_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/events","assignees_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/assignees{/user}","branches_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/branches{/branch}","tags_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/tags","blobs_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/git/refs{/sha}","trees_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/statuses/{sha}","languages_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/languages","stargazers_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/stargazers","contributors_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/contributors","subscribers_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/subscribers","subscription_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/subscription","commits_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/commits{/sha}","git_commits_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/git/commits{/sha}","comments_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/comments{/number}","issue_comment_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/issues/comments{/number}","contents_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/contents/{+path}","compare_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/merges","archive_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/downloads","issues_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/issues{/number}","pulls_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/pulls{/number}","milestones_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/milestones{/number}","notifications_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/labels{/name}","releases_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/releases{/id}","created_at":"2015-05-28T21:16:52Z","updated_at":"2015-05-28T21:16:52Z","pushed_at":"2015-05-29T22:04:41Z","git_url":"git://github.com/Ada-Developers-Academy/C3Projects--BankAccounts.git","ssh_url":"git@github.com:Ada-Developers-Academy/C3Projects--BankAccounts.git","clone_url":"https://github.com/Ada-Developers-Academy/C3Projects--BankAccounts.git","svn_url":"https://github.com/Ada-Developers-Academy/C3Projects--BankAccounts","homepage":null,"size":293,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":25,"mirror_url":null,"open_issues_count":1,"forks":25,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/pulls/1"},"html":{"href":"https://github.com/Ada-Developers-Academy/C3Projects--BankAccounts/pull/1"},"issue":{"href":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/issues/1"},"comments":{"href":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--BankAccounts/statuses/e083371f1bec4c82783bad2fd8bf8bc967ecf09c"}}}}