{"action":"created","comment":{"url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/pulls/comments/63292708","id":63292708,"diff_hunk":"@@ -39,12 +39,14 @@ def delete(self, category_id):\n         is_deleted = self.magento.catalog_category.delete(category_id)\n         return is_deleted\n \n-    def disable(self, category_id):\n+    def update_active_status(self, category_id, is_active=True):\n         # magento requires sorting values to be passed\n-        is_disabled = self.magento.catalog_category.update(\n+        is_updated = self.magento.catalog_category.update(\n             category_id,\n-            {'is_active': '0', 'available_sort_by': 'position', 'default_sort_by': 'position'})\n-        return is_disabled\n+            { 'is_active': '1' if is_active else '0',","path":"ma/api/category.py","position":null,"original_position":12,"commit_id":"193abf10a545c3431de63f010c571c1779b01c46","original_commit_id":"7bb2b461d8e77954a6eacddfe18a443d1670f44c","user":{"login":"dsoprea","id":715626,"avatar_url":"https://avatars.githubusercontent.com/u/715626?v=3","gravatar_id":"","url":"https://api.github.com/users/dsoprea","html_url":"https://github.com/dsoprea","followers_url":"https://api.github.com/users/dsoprea/followers","following_url":"https://api.github.com/users/dsoprea/following{/other_user}","gists_url":"https://api.github.com/users/dsoprea/gists{/gist_id}","starred_url":"https://api.github.com/users/dsoprea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dsoprea/subscriptions","organizations_url":"https://api.github.com/users/dsoprea/orgs","repos_url":"https://api.github.com/users/dsoprea/repos","events_url":"https://api.github.com/users/dsoprea/events{/privacy}","received_events_url":"https://api.github.com/users/dsoprea/received_events","type":"User","site_admin":false},"body":"That's fine, if you think the readability trumps the convention for this\nparticular thing (as opposed to every other occurrence). As long as it's\nthoughtful and intentional.\n\n\n\nDustin\n\nOn Fri, May 13, 2016 at 4:40 PM, Diego Terzano <notifications@github.com>\nwrote:\n\n> In ma/api/category.py\n> <https://github.com/CoffeeForThinkers/MagentoAPI/pull/2#discussion_r63247915>\n> :\n>\n> >              category_id,\n> > -            {'is_active': '0', 'available_sort_by': 'position', 'default_sort_by': 'position'})\n> > -        return is_disabled\n> > +            { 'is_active': '1' if is_active else '0',\n>\n> ok, will do. I thought about doing that but since Magento sometimes uses 0\n> for True, I wanted it to be VERY explicit and readable.\n>\n> —\n> You are receiving this because you were assigned.\n> Reply to this email directly or view it on GitHub\n> <https://github.com/CoffeeForThinkers/MagentoAPI/pull/2/files/7bb2b461d8e77954a6eacddfe18a443d1670f44c#r63247915>\n>\n","created_at":"2016-05-15T14:42:15Z","updated_at":"2016-05-15T14:42:15Z","html_url":"https://github.com/CoffeeForThinkers/MagentoAPI/pull/2#discussion_r63292708","pull_request_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/pulls/comments/63292708"},"html":{"href":"https://github.com/CoffeeForThinkers/MagentoAPI/pull/2#discussion_r63292708"},"pull_request":{"href":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/pulls/2","id":69624643,"html_url":"https://github.com/CoffeeForThinkers/MagentoAPI/pull/2","diff_url":"https://github.com/CoffeeForThinkers/MagentoAPI/pull/2.diff","patch_url":"https://github.com/CoffeeForThinkers/MagentoAPI/pull/2.patch","issue_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/issues/2","number":2,"state":"closed","locked":false,"title":"Refactored category enable/disable capabilities.","user":{"login":"terzano","id":343932,"avatar_url":"https://avatars.githubusercontent.com/u/343932?v=3","gravatar_id":"","url":"https://api.github.com/users/terzano","html_url":"https://github.com/terzano","followers_url":"https://api.github.com/users/terzano/followers","following_url":"https://api.github.com/users/terzano/following{/other_user}","gists_url":"https://api.github.com/users/terzano/gists{/gist_id}","starred_url":"https://api.github.com/users/terzano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/terzano/subscriptions","organizations_url":"https://api.github.com/users/terzano/orgs","repos_url":"https://api.github.com/users/terzano/repos","events_url":"https://api.github.com/users/terzano/events{/privacy}","received_events_url":"https://api.github.com/users/terzano/received_events","type":"User","site_admin":false},"body":"makes the process to enable/disable a category more intuitive.","created_at":"2016-05-11T07:13:04Z","updated_at":"2016-05-15T14:42:15Z","closed_at":"2016-05-13T21:13:53Z","merged_at":"2016-05-13T21:13:53Z","merge_commit_sha":"972aa19e99411fcdaac833dfd46cbf305356a3c3","assignee":{"login":"dsoprea","id":715626,"avatar_url":"https://avatars.githubusercontent.com/u/715626?v=3","gravatar_id":"","url":"https://api.github.com/users/dsoprea","html_url":"https://github.com/dsoprea","followers_url":"https://api.github.com/users/dsoprea/followers","following_url":"https://api.github.com/users/dsoprea/following{/other_user}","gists_url":"https://api.github.com/users/dsoprea/gists{/gist_id}","starred_url":"https://api.github.com/users/dsoprea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dsoprea/subscriptions","organizations_url":"https://api.github.com/users/dsoprea/orgs","repos_url":"https://api.github.com/users/dsoprea/repos","events_url":"https://api.github.com/users/dsoprea/events{/privacy}","received_events_url":"https://api.github.com/users/dsoprea/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/pulls/2/commits","review_comments_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/pulls/2/comments","review_comment_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/issues/2/comments","statuses_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/statuses/193abf10a545c3431de63f010c571c1779b01c46","head":{"label":"CoffeeForThinkers:categories","ref":"categories","sha":"193abf10a545c3431de63f010c571c1779b01c46","user":{"login":"CoffeeForThinkers","id":17146890,"avatar_url":"https://avatars.githubusercontent.com/u/17146890?v=3","gravatar_id":"","url":"https://api.github.com/users/CoffeeForThinkers","html_url":"https://github.com/CoffeeForThinkers","followers_url":"https://api.github.com/users/CoffeeForThinkers/followers","following_url":"https://api.github.com/users/CoffeeForThinkers/following{/other_user}","gists_url":"https://api.github.com/users/CoffeeForThinkers/gists{/gist_id}","starred_url":"https://api.github.com/users/CoffeeForThinkers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CoffeeForThinkers/subscriptions","organizations_url":"https://api.github.com/users/CoffeeForThinkers/orgs","repos_url":"https://api.github.com/users/CoffeeForThinkers/repos","events_url":"https://api.github.com/users/CoffeeForThinkers/events{/privacy}","received_events_url":"https://api.github.com/users/CoffeeForThinkers/received_events","type":"Organization","site_admin":false},"repo":{"id":51386538,"name":"MagentoAPI","full_name":"CoffeeForThinkers/MagentoAPI","owner":{"login":"CoffeeForThinkers","id":17146890,"avatar_url":"https://avatars.githubusercontent.com/u/17146890?v=3","gravatar_id":"","url":"https://api.github.com/users/CoffeeForThinkers","html_url":"https://github.com/CoffeeForThinkers","followers_url":"https://api.github.com/users/CoffeeForThinkers/followers","following_url":"https://api.github.com/users/CoffeeForThinkers/following{/other_user}","gists_url":"https://api.github.com/users/CoffeeForThinkers/gists{/gist_id}","starred_url":"https://api.github.com/users/CoffeeForThinkers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CoffeeForThinkers/subscriptions","organizations_url":"https://api.github.com/users/CoffeeForThinkers/orgs","repos_url":"https://api.github.com/users/CoffeeForThinkers/repos","events_url":"https://api.github.com/users/CoffeeForThinkers/events{/privacy}","received_events_url":"https://api.github.com/users/CoffeeForThinkers/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CoffeeForThinkers/MagentoAPI","description":"A set of Magento API adapters.","fork":false,"url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI","forks_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/forks","keys_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/teams","hooks_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/hooks","issue_events_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/issues/events{/number}","events_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/events","assignees_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/assignees{/user}","branches_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/branches{/branch}","tags_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/tags","blobs_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/git/refs{/sha}","trees_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/statuses/{sha}","languages_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/languages","stargazers_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/stargazers","contributors_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/contributors","subscribers_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/subscribers","subscription_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/subscription","commits_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/commits{/sha}","git_commits_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/git/commits{/sha}","comments_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/comments{/number}","issue_comment_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/issues/comments{/number}","contents_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/contents/{+path}","compare_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/merges","archive_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/downloads","issues_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/issues{/number}","pulls_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/pulls{/number}","milestones_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/milestones{/number}","notifications_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/labels{/name}","releases_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/releases{/id}","deployments_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/deployments","created_at":"2016-02-09T17:57:33Z","updated_at":"2016-04-26T05:31:17Z","pushed_at":"2016-05-13T21:13:55Z","git_url":"git://github.com/CoffeeForThinkers/MagentoAPI.git","ssh_url":"git@github.com:CoffeeForThinkers/MagentoAPI.git","clone_url":"https://github.com/CoffeeForThinkers/MagentoAPI.git","svn_url":"https://github.com/CoffeeForThinkers/MagentoAPI","homepage":null,"size":52,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"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":1,"default_branch":"master"}},"base":{"label":"CoffeeForThinkers:master","ref":"master","sha":"931ac7b88def795ac01453da754448677f347f00","user":{"login":"CoffeeForThinkers","id":17146890,"avatar_url":"https://avatars.githubusercontent.com/u/17146890?v=3","gravatar_id":"","url":"https://api.github.com/users/CoffeeForThinkers","html_url":"https://github.com/CoffeeForThinkers","followers_url":"https://api.github.com/users/CoffeeForThinkers/followers","following_url":"https://api.github.com/users/CoffeeForThinkers/following{/other_user}","gists_url":"https://api.github.com/users/CoffeeForThinkers/gists{/gist_id}","starred_url":"https://api.github.com/users/CoffeeForThinkers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CoffeeForThinkers/subscriptions","organizations_url":"https://api.github.com/users/CoffeeForThinkers/orgs","repos_url":"https://api.github.com/users/CoffeeForThinkers/repos","events_url":"https://api.github.com/users/CoffeeForThinkers/events{/privacy}","received_events_url":"https://api.github.com/users/CoffeeForThinkers/received_events","type":"Organization","site_admin":false},"repo":{"id":51386538,"name":"MagentoAPI","full_name":"CoffeeForThinkers/MagentoAPI","owner":{"login":"CoffeeForThinkers","id":17146890,"avatar_url":"https://avatars.githubusercontent.com/u/17146890?v=3","gravatar_id":"","url":"https://api.github.com/users/CoffeeForThinkers","html_url":"https://github.com/CoffeeForThinkers","followers_url":"https://api.github.com/users/CoffeeForThinkers/followers","following_url":"https://api.github.com/users/CoffeeForThinkers/following{/other_user}","gists_url":"https://api.github.com/users/CoffeeForThinkers/gists{/gist_id}","starred_url":"https://api.github.com/users/CoffeeForThinkers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CoffeeForThinkers/subscriptions","organizations_url":"https://api.github.com/users/CoffeeForThinkers/orgs","repos_url":"https://api.github.com/users/CoffeeForThinkers/repos","events_url":"https://api.github.com/users/CoffeeForThinkers/events{/privacy}","received_events_url":"https://api.github.com/users/CoffeeForThinkers/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CoffeeForThinkers/MagentoAPI","description":"A set of Magento API adapters.","fork":false,"url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI","forks_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/forks","keys_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/teams","hooks_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/hooks","issue_events_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/issues/events{/number}","events_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/events","assignees_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/assignees{/user}","branches_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/branches{/branch}","tags_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/tags","blobs_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/git/refs{/sha}","trees_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/statuses/{sha}","languages_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/languages","stargazers_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/stargazers","contributors_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/contributors","subscribers_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/subscribers","subscription_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/subscription","commits_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/commits{/sha}","git_commits_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/git/commits{/sha}","comments_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/comments{/number}","issue_comment_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/issues/comments{/number}","contents_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/contents/{+path}","compare_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/merges","archive_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/downloads","issues_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/issues{/number}","pulls_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/pulls{/number}","milestones_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/milestones{/number}","notifications_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/labels{/name}","releases_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/releases{/id}","deployments_url":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/deployments","created_at":"2016-02-09T17:57:33Z","updated_at":"2016-04-26T05:31:17Z","pushed_at":"2016-05-13T21:13:55Z","git_url":"git://github.com/CoffeeForThinkers/MagentoAPI.git","ssh_url":"git@github.com:CoffeeForThinkers/MagentoAPI.git","clone_url":"https://github.com/CoffeeForThinkers/MagentoAPI.git","svn_url":"https://github.com/CoffeeForThinkers/MagentoAPI","homepage":null,"size":52,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"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":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/pulls/2"},"html":{"href":"https://github.com/CoffeeForThinkers/MagentoAPI/pull/2"},"issue":{"href":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/issues/2"},"comments":{"href":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/CoffeeForThinkers/MagentoAPI/statuses/193abf10a545c3431de63f010c571c1779b01c46"}}}}