{"action":"created","comment":{"url":"https://api.github.com/repos/envato/double_entry/pulls/comments/240783577","pull_request_review_id":183893752,"id":240783577,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MDc4MzU3Nw==","diff_hunk":"@@ -142,28 +142,6 @@ def aggregate_array(function:, account:, code:, partner_account: nil, filter: ni\n                          filter: filter, range_type: range_type, start: start, finish: finish)\n     end\n \n-    # Identify the scopes with the given account identifier holding at least\n-    # the provided minimum balance.\n-    #\n-    # @example Find users with at least $1,000,000 in their savings accounts\n-    #   DoubleEntry::Reporting.scopes_with_minimum_balance_for_account(\n-    #     1_000_000.dollars,\n-    #     :savings,\n-    #   ) # might return the user ids: [ 1423, 12232, 34729 ]\n-    # @param [Money] minimum_balance Minimum account balance a scope must have\n-    #   to be included in the result set.\n-    # @param [Symbol] account_identifier\n-    # @return [Array<Integer>] Scopes\n-    #\n-    def scopes_with_minimum_balance_for_account(minimum_balance, account_identifier)","path":"lib/double_entry/reporting.rb","position":17,"original_position":17,"commit_id":"971973da44fb433d17a5f8410be80e474bc14869","original_commit_id":"971973da44fb433d17a5f8410be80e474bc14869","user":{"login":"scottyp-env","id":42128830,"node_id":"MDQ6VXNlcjQyMTI4ODMw","avatar_url":"https://avatars2.githubusercontent.com/u/42128830?v=4","gravatar_id":"","url":"https://api.github.com/users/scottyp-env","html_url":"https://github.com/scottyp-env","followers_url":"https://api.github.com/users/scottyp-env/followers","following_url":"https://api.github.com/users/scottyp-env/following{/other_user}","gists_url":"https://api.github.com/users/scottyp-env/gists{/gist_id}","starred_url":"https://api.github.com/users/scottyp-env/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scottyp-env/subscriptions","organizations_url":"https://api.github.com/users/scottyp-env/orgs","repos_url":"https://api.github.com/users/scottyp-env/repos","events_url":"https://api.github.com/users/scottyp-env/events{/privacy}","received_events_url":"https://api.github.com/users/scottyp-env/received_events","type":"User","site_admin":false},"body":"Perfect!","created_at":"2018-12-11T20:43:15Z","updated_at":"2018-12-11T20:43:15Z","html_url":"https://github.com/envato/double_entry/pull/161#discussion_r240783577","pull_request_url":"https://api.github.com/repos/envato/double_entry/pulls/161","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/envato/double_entry/pulls/comments/240783577"},"html":{"href":"https://github.com/envato/double_entry/pull/161#discussion_r240783577"},"pull_request":{"href":"https://api.github.com/repos/envato/double_entry/pulls/161"}},"in_reply_to_id":234470271},"pull_request":{"url":"https://api.github.com/repos/envato/double_entry/pulls/161","id":231774956,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMxNzc0OTU2","html_url":"https://github.com/envato/double_entry/pull/161","diff_url":"https://github.com/envato/double_entry/pull/161.diff","patch_url":"https://github.com/envato/double_entry/pull/161.patch","issue_url":"https://api.github.com/repos/envato/double_entry/issues/161","number":161,"state":"open","locked":false,"title":"Move scopes_with_minimum_balance_for_account method to AccountBalance","user":{"login":"orien","id":497874,"node_id":"MDQ6VXNlcjQ5Nzg3NA==","avatar_url":"https://avatars0.githubusercontent.com/u/497874?v=4","gravatar_id":"","url":"https://api.github.com/users/orien","html_url":"https://github.com/orien","followers_url":"https://api.github.com/users/orien/followers","following_url":"https://api.github.com/users/orien/following{/other_user}","gists_url":"https://api.github.com/users/orien/gists{/gist_id}","starred_url":"https://api.github.com/users/orien/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orien/subscriptions","organizations_url":"https://api.github.com/users/orien/orgs","repos_url":"https://api.github.com/users/orien/repos","events_url":"https://api.github.com/users/orien/events{/privacy}","received_events_url":"https://api.github.com/users/orien/received_events","type":"User","site_admin":false},"body":"The method `Reporting.scopes_with_minimum_balance_for_account` is a direct query on the `AccountBalance` active record model. I think the definition should live on that model. \r\n\r\nMinor change, the method now returns an array of `String` values rather than `Integer`s. This is more correct as scopes are defined and stored as strings and may not be integers in some account configurations.","created_at":"2018-11-18T08:17:18Z","updated_at":"2018-12-11T20:43:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"151af837917b3dc02044c905c61b820c565a1b78","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/envato/double_entry/pulls/161/commits","review_comments_url":"https://api.github.com/repos/envato/double_entry/pulls/161/comments","review_comment_url":"https://api.github.com/repos/envato/double_entry/pulls/comments{/number}","comments_url":"https://api.github.com/repos/envato/double_entry/issues/161/comments","statuses_url":"https://api.github.com/repos/envato/double_entry/statuses/971973da44fb433d17a5f8410be80e474bc14869","head":{"label":"envato:move-scopes_with_minimum_balance_for_account","ref":"move-scopes_with_minimum_balance_for_account","sha":"971973da44fb433d17a5f8410be80e474bc14869","user":{"login":"envato","id":14786,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0Nzg2","avatar_url":"https://avatars0.githubusercontent.com/u/14786?v=4","gravatar_id":"","url":"https://api.github.com/users/envato","html_url":"https://github.com/envato","followers_url":"https://api.github.com/users/envato/followers","following_url":"https://api.github.com/users/envato/following{/other_user}","gists_url":"https://api.github.com/users/envato/gists{/gist_id}","starred_url":"https://api.github.com/users/envato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/envato/subscriptions","organizations_url":"https://api.github.com/users/envato/orgs","repos_url":"https://api.github.com/users/envato/repos","events_url":"https://api.github.com/users/envato/events{/privacy}","received_events_url":"https://api.github.com/users/envato/received_events","type":"Organization","site_admin":false},"repo":{"id":20909885,"node_id":"MDEwOlJlcG9zaXRvcnkyMDkwOTg4NQ==","name":"double_entry","full_name":"envato/double_entry","private":false,"owner":{"login":"envato","id":14786,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0Nzg2","avatar_url":"https://avatars0.githubusercontent.com/u/14786?v=4","gravatar_id":"","url":"https://api.github.com/users/envato","html_url":"https://github.com/envato","followers_url":"https://api.github.com/users/envato/followers","following_url":"https://api.github.com/users/envato/following{/other_user}","gists_url":"https://api.github.com/users/envato/gists{/gist_id}","starred_url":"https://api.github.com/users/envato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/envato/subscriptions","organizations_url":"https://api.github.com/users/envato/orgs","repos_url":"https://api.github.com/users/envato/repos","events_url":"https://api.github.com/users/envato/events{/privacy}","received_events_url":"https://api.github.com/users/envato/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/envato/double_entry","description":"A double-entry accounting system for Ruby applications.","fork":false,"url":"https://api.github.com/repos/envato/double_entry","forks_url":"https://api.github.com/repos/envato/double_entry/forks","keys_url":"https://api.github.com/repos/envato/double_entry/keys{/key_id}","collaborators_url":"https://api.github.com/repos/envato/double_entry/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/envato/double_entry/teams","hooks_url":"https://api.github.com/repos/envato/double_entry/hooks","issue_events_url":"https://api.github.com/repos/envato/double_entry/issues/events{/number}","events_url":"https://api.github.com/repos/envato/double_entry/events","assignees_url":"https://api.github.com/repos/envato/double_entry/assignees{/user}","branches_url":"https://api.github.com/repos/envato/double_entry/branches{/branch}","tags_url":"https://api.github.com/repos/envato/double_entry/tags","blobs_url":"https://api.github.com/repos/envato/double_entry/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/envato/double_entry/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/envato/double_entry/git/refs{/sha}","trees_url":"https://api.github.com/repos/envato/double_entry/git/trees{/sha}","statuses_url":"https://api.github.com/repos/envato/double_entry/statuses/{sha}","languages_url":"https://api.github.com/repos/envato/double_entry/languages","stargazers_url":"https://api.github.com/repos/envato/double_entry/stargazers","contributors_url":"https://api.github.com/repos/envato/double_entry/contributors","subscribers_url":"https://api.github.com/repos/envato/double_entry/subscribers","subscription_url":"https://api.github.com/repos/envato/double_entry/subscription","commits_url":"https://api.github.com/repos/envato/double_entry/commits{/sha}","git_commits_url":"https://api.github.com/repos/envato/double_entry/git/commits{/sha}","comments_url":"https://api.github.com/repos/envato/double_entry/comments{/number}","issue_comment_url":"https://api.github.com/repos/envato/double_entry/issues/comments{/number}","contents_url":"https://api.github.com/repos/envato/double_entry/contents/{+path}","compare_url":"https://api.github.com/repos/envato/double_entry/compare/{base}...{head}","merges_url":"https://api.github.com/repos/envato/double_entry/merges","archive_url":"https://api.github.com/repos/envato/double_entry/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/envato/double_entry/downloads","issues_url":"https://api.github.com/repos/envato/double_entry/issues{/number}","pulls_url":"https://api.github.com/repos/envato/double_entry/pulls{/number}","milestones_url":"https://api.github.com/repos/envato/double_entry/milestones{/number}","notifications_url":"https://api.github.com/repos/envato/double_entry/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/envato/double_entry/labels{/name}","releases_url":"https://api.github.com/repos/envato/double_entry/releases{/id}","deployments_url":"https://api.github.com/repos/envato/double_entry/deployments","created_at":"2014-06-17T04:10:25Z","updated_at":"2018-12-11T05:53:55Z","pushed_at":"2018-12-11T05:53:55Z","git_url":"git://github.com/envato/double_entry.git","ssh_url":"git@github.com:envato/double_entry.git","clone_url":"https://github.com/envato/double_entry.git","svn_url":"https://github.com/envato/double_entry","homepage":"","size":633,"stargazers_count":154,"watchers_count":154,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":26,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":26,"open_issues":4,"watchers":154,"default_branch":"master"}},"base":{"label":"envato:master","ref":"master","sha":"ece90e6a03fbc4befb52ef86ff53489230baf9f5","user":{"login":"envato","id":14786,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0Nzg2","avatar_url":"https://avatars0.githubusercontent.com/u/14786?v=4","gravatar_id":"","url":"https://api.github.com/users/envato","html_url":"https://github.com/envato","followers_url":"https://api.github.com/users/envato/followers","following_url":"https://api.github.com/users/envato/following{/other_user}","gists_url":"https://api.github.com/users/envato/gists{/gist_id}","starred_url":"https://api.github.com/users/envato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/envato/subscriptions","organizations_url":"https://api.github.com/users/envato/orgs","repos_url":"https://api.github.com/users/envato/repos","events_url":"https://api.github.com/users/envato/events{/privacy}","received_events_url":"https://api.github.com/users/envato/received_events","type":"Organization","site_admin":false},"repo":{"id":20909885,"node_id":"MDEwOlJlcG9zaXRvcnkyMDkwOTg4NQ==","name":"double_entry","full_name":"envato/double_entry","private":false,"owner":{"login":"envato","id":14786,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0Nzg2","avatar_url":"https://avatars0.githubusercontent.com/u/14786?v=4","gravatar_id":"","url":"https://api.github.com/users/envato","html_url":"https://github.com/envato","followers_url":"https://api.github.com/users/envato/followers","following_url":"https://api.github.com/users/envato/following{/other_user}","gists_url":"https://api.github.com/users/envato/gists{/gist_id}","starred_url":"https://api.github.com/users/envato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/envato/subscriptions","organizations_url":"https://api.github.com/users/envato/orgs","repos_url":"https://api.github.com/users/envato/repos","events_url":"https://api.github.com/users/envato/events{/privacy}","received_events_url":"https://api.github.com/users/envato/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/envato/double_entry","description":"A double-entry accounting system for Ruby applications.","fork":false,"url":"https://api.github.com/repos/envato/double_entry","forks_url":"https://api.github.com/repos/envato/double_entry/forks","keys_url":"https://api.github.com/repos/envato/double_entry/keys{/key_id}","collaborators_url":"https://api.github.com/repos/envato/double_entry/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/envato/double_entry/teams","hooks_url":"https://api.github.com/repos/envato/double_entry/hooks","issue_events_url":"https://api.github.com/repos/envato/double_entry/issues/events{/number}","events_url":"https://api.github.com/repos/envato/double_entry/events","assignees_url":"https://api.github.com/repos/envato/double_entry/assignees{/user}","branches_url":"https://api.github.com/repos/envato/double_entry/branches{/branch}","tags_url":"https://api.github.com/repos/envato/double_entry/tags","blobs_url":"https://api.github.com/repos/envato/double_entry/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/envato/double_entry/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/envato/double_entry/git/refs{/sha}","trees_url":"https://api.github.com/repos/envato/double_entry/git/trees{/sha}","statuses_url":"https://api.github.com/repos/envato/double_entry/statuses/{sha}","languages_url":"https://api.github.com/repos/envato/double_entry/languages","stargazers_url":"https://api.github.com/repos/envato/double_entry/stargazers","contributors_url":"https://api.github.com/repos/envato/double_entry/contributors","subscribers_url":"https://api.github.com/repos/envato/double_entry/subscribers","subscription_url":"https://api.github.com/repos/envato/double_entry/subscription","commits_url":"https://api.github.com/repos/envato/double_entry/commits{/sha}","git_commits_url":"https://api.github.com/repos/envato/double_entry/git/commits{/sha}","comments_url":"https://api.github.com/repos/envato/double_entry/comments{/number}","issue_comment_url":"https://api.github.com/repos/envato/double_entry/issues/comments{/number}","contents_url":"https://api.github.com/repos/envato/double_entry/contents/{+path}","compare_url":"https://api.github.com/repos/envato/double_entry/compare/{base}...{head}","merges_url":"https://api.github.com/repos/envato/double_entry/merges","archive_url":"https://api.github.com/repos/envato/double_entry/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/envato/double_entry/downloads","issues_url":"https://api.github.com/repos/envato/double_entry/issues{/number}","pulls_url":"https://api.github.com/repos/envato/double_entry/pulls{/number}","milestones_url":"https://api.github.com/repos/envato/double_entry/milestones{/number}","notifications_url":"https://api.github.com/repos/envato/double_entry/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/envato/double_entry/labels{/name}","releases_url":"https://api.github.com/repos/envato/double_entry/releases{/id}","deployments_url":"https://api.github.com/repos/envato/double_entry/deployments","created_at":"2014-06-17T04:10:25Z","updated_at":"2018-12-11T05:53:55Z","pushed_at":"2018-12-11T05:53:55Z","git_url":"git://github.com/envato/double_entry.git","ssh_url":"git@github.com:envato/double_entry.git","clone_url":"https://github.com/envato/double_entry.git","svn_url":"https://github.com/envato/double_entry","homepage":"","size":633,"stargazers_count":154,"watchers_count":154,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":26,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":26,"open_issues":4,"watchers":154,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/envato/double_entry/pulls/161"},"html":{"href":"https://github.com/envato/double_entry/pull/161"},"issue":{"href":"https://api.github.com/repos/envato/double_entry/issues/161"},"comments":{"href":"https://api.github.com/repos/envato/double_entry/issues/161/comments"},"review_comments":{"href":"https://api.github.com/repos/envato/double_entry/pulls/161/comments"},"review_comment":{"href":"https://api.github.com/repos/envato/double_entry/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/envato/double_entry/pulls/161/commits"},"statuses":{"href":"https://api.github.com/repos/envato/double_entry/statuses/971973da44fb433d17a5f8410be80e474bc14869"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"scottyp-env"}}