{"action":"created","comment":{"url":"https://api.github.com/repos/coopdevs/katuma/pulls/comments/82497878","pull_request_review_id":3404357,"id":82497878,"diff_hunk":"@@ -0,0 +1,44 @@\n+module Suppliers\n+  class ProducerPresenter\n+    # @param producer [Producer]\n+    # @param user [User]\n+    def initialize(producer, user)\n+      @producer = producer\n+      @user = user\n+    end\n+\n+    # Checks if the given user has edit rights on the producer\n+    #\n+    # @return [Boolean]\n+    def can_edit","path":"engines/suppliers/app/presenters/suppliers/producer_presenter.rb","position":13,"original_position":13,"commit_id":"040bccff2a8147fc34866a22a2922577463c89ee","original_commit_id":"c2285979283072ad30835007e68fc97ee5e3e830","user":{"login":"enricostano","id":748971,"avatar_url":"https://avatars.githubusercontent.com/u/748971?v=3","gravatar_id":"","url":"https://api.github.com/users/enricostano","html_url":"https://github.com/enricostano","followers_url":"https://api.github.com/users/enricostano/followers","following_url":"https://api.github.com/users/enricostano/following{/other_user}","gists_url":"https://api.github.com/users/enricostano/gists{/gist_id}","starred_url":"https://api.github.com/users/enricostano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enricostano/subscriptions","organizations_url":"https://api.github.com/users/enricostano/orgs","repos_url":"https://api.github.com/users/enricostano/repos","events_url":"https://api.github.com/users/enricostano/events{/privacy}","received_events_url":"https://api.github.com/users/enricostano/received_events","type":"User","site_admin":false},"body":"it's an attribute, for now the serializers are just mapping attributes from models/presenters directly. Maybe an alias or something. will check.","created_at":"2016-10-08T07:38:03Z","updated_at":"2016-10-08T07:38:03Z","html_url":"https://github.com/coopdevs/katuma/pull/87#discussion_r82497878","pull_request_url":"https://api.github.com/repos/coopdevs/katuma/pulls/87","_links":{"self":{"href":"https://api.github.com/repos/coopdevs/katuma/pulls/comments/82497878"},"html":{"href":"https://github.com/coopdevs/katuma/pull/87#discussion_r82497878"},"pull_request":{"href":"https://api.github.com/repos/coopdevs/katuma/pulls/87"}}},"pull_request":{"url":"https://api.github.com/repos/coopdevs/katuma/pulls/87","id":86235769,"html_url":"https://github.com/coopdevs/katuma/pull/87","diff_url":"https://github.com/coopdevs/katuma/pull/87.diff","patch_url":"https://github.com/coopdevs/katuma/pull/87.patch","issue_url":"https://api.github.com/repos/coopdevs/katuma/issues/87","number":87,"state":"open","locked":false,"title":"Providers resource","user":{"login":"enricostano","id":748971,"avatar_url":"https://avatars.githubusercontent.com/u/748971?v=3","gravatar_id":"","url":"https://api.github.com/users/enricostano","html_url":"https://github.com/enricostano","followers_url":"https://api.github.com/users/enricostano/followers","following_url":"https://api.github.com/users/enricostano/following{/other_user}","gists_url":"https://api.github.com/users/enricostano/gists{/gist_id}","starred_url":"https://api.github.com/users/enricostano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enricostano/subscriptions","organizations_url":"https://api.github.com/users/enricostano/orgs","repos_url":"https://api.github.com/users/enricostano/repos","events_url":"https://api.github.com/users/enricostano/events{/privacy}","received_events_url":"https://api.github.com/users/enricostano/received_events","type":"User","site_admin":false},"body":"Before placing an `Order` to a given `Producer` the users of a `Group` need to retrieve first all the `Producer`s that are available for a `Group` as providers:\r\n```\r\nGET /api/v1/producers?group_id=27\r\n```\r\nThis request will return all the `Producer`s associated to a `Group` through the join model `Supplier`.\r\n```json\r\n[\r\n  {\r\n    \"id\":12,\r\n    \"name\":\"Producer #1\",\r\n    \"address\":\"C/ del primer productor\",\r\n    \"email\":\"productor+1@katuma.org\",\r\n    \"created_at\":\"2016-09-19T18:19:46.233Z\",\r\n    \"updated_at\":\"2016-09-19T18:19:46.233Z\"\r\n  },\r\n  {\r\n    \"id\":15,\r\n    \"name\":\"Producer #2\",\r\n    \"address\":\"C/ del segundo productor\",\r\n    \"email\":\"productor+2@katuma.org\",\r\n    \"created_at\":\"2016-09-19T18:19:46.233Z\",\r\n    \"updated_at\":\"2016-09-19T18:19:46.233Z\"\r\n  }\r\n]\r\n```","created_at":"2016-09-21T20:31:28Z","updated_at":"2016-10-08T07:38:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dd757ff864c868a11b9ca29db02daf03fc52fcaf","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/coopdevs/katuma/pulls/87/commits","review_comments_url":"https://api.github.com/repos/coopdevs/katuma/pulls/87/comments","review_comment_url":"https://api.github.com/repos/coopdevs/katuma/pulls/comments{/number}","comments_url":"https://api.github.com/repos/coopdevs/katuma/issues/87/comments","statuses_url":"https://api.github.com/repos/coopdevs/katuma/statuses/040bccff2a8147fc34866a22a2922577463c89ee","head":{"label":"coopdevs:feature/providers-resource","ref":"feature/providers-resource","sha":"040bccff2a8147fc34866a22a2922577463c89ee","user":{"login":"coopdevs","id":4038308,"avatar_url":"https://avatars.githubusercontent.com/u/4038308?v=3","gravatar_id":"","url":"https://api.github.com/users/coopdevs","html_url":"https://github.com/coopdevs","followers_url":"https://api.github.com/users/coopdevs/followers","following_url":"https://api.github.com/users/coopdevs/following{/other_user}","gists_url":"https://api.github.com/users/coopdevs/gists{/gist_id}","starred_url":"https://api.github.com/users/coopdevs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coopdevs/subscriptions","organizations_url":"https://api.github.com/users/coopdevs/orgs","repos_url":"https://api.github.com/users/coopdevs/repos","events_url":"https://api.github.com/users/coopdevs/events{/privacy}","received_events_url":"https://api.github.com/users/coopdevs/received_events","type":"Organization","site_admin":false},"repo":{"id":9176730,"name":"katuma","full_name":"coopdevs/katuma","owner":{"login":"coopdevs","id":4038308,"avatar_url":"https://avatars.githubusercontent.com/u/4038308?v=3","gravatar_id":"","url":"https://api.github.com/users/coopdevs","html_url":"https://github.com/coopdevs","followers_url":"https://api.github.com/users/coopdevs/followers","following_url":"https://api.github.com/users/coopdevs/following{/other_user}","gists_url":"https://api.github.com/users/coopdevs/gists{/gist_id}","starred_url":"https://api.github.com/users/coopdevs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coopdevs/subscriptions","organizations_url":"https://api.github.com/users/coopdevs/orgs","repos_url":"https://api.github.com/users/coopdevs/repos","events_url":"https://api.github.com/users/coopdevs/events{/privacy}","received_events_url":"https://api.github.com/users/coopdevs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/coopdevs/katuma","description":"Katuma backend API","fork":false,"url":"https://api.github.com/repos/coopdevs/katuma","forks_url":"https://api.github.com/repos/coopdevs/katuma/forks","keys_url":"https://api.github.com/repos/coopdevs/katuma/keys{/key_id}","collaborators_url":"https://api.github.com/repos/coopdevs/katuma/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/coopdevs/katuma/teams","hooks_url":"https://api.github.com/repos/coopdevs/katuma/hooks","issue_events_url":"https://api.github.com/repos/coopdevs/katuma/issues/events{/number}","events_url":"https://api.github.com/repos/coopdevs/katuma/events","assignees_url":"https://api.github.com/repos/coopdevs/katuma/assignees{/user}","branches_url":"https://api.github.com/repos/coopdevs/katuma/branches{/branch}","tags_url":"https://api.github.com/repos/coopdevs/katuma/tags","blobs_url":"https://api.github.com/repos/coopdevs/katuma/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/coopdevs/katuma/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/coopdevs/katuma/git/refs{/sha}","trees_url":"https://api.github.com/repos/coopdevs/katuma/git/trees{/sha}","statuses_url":"https://api.github.com/repos/coopdevs/katuma/statuses/{sha}","languages_url":"https://api.github.com/repos/coopdevs/katuma/languages","stargazers_url":"https://api.github.com/repos/coopdevs/katuma/stargazers","contributors_url":"https://api.github.com/repos/coopdevs/katuma/contributors","subscribers_url":"https://api.github.com/repos/coopdevs/katuma/subscribers","subscription_url":"https://api.github.com/repos/coopdevs/katuma/subscription","commits_url":"https://api.github.com/repos/coopdevs/katuma/commits{/sha}","git_commits_url":"https://api.github.com/repos/coopdevs/katuma/git/commits{/sha}","comments_url":"https://api.github.com/repos/coopdevs/katuma/comments{/number}","issue_comment_url":"https://api.github.com/repos/coopdevs/katuma/issues/comments{/number}","contents_url":"https://api.github.com/repos/coopdevs/katuma/contents/{+path}","compare_url":"https://api.github.com/repos/coopdevs/katuma/compare/{base}...{head}","merges_url":"https://api.github.com/repos/coopdevs/katuma/merges","archive_url":"https://api.github.com/repos/coopdevs/katuma/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/coopdevs/katuma/downloads","issues_url":"https://api.github.com/repos/coopdevs/katuma/issues{/number}","pulls_url":"https://api.github.com/repos/coopdevs/katuma/pulls{/number}","milestones_url":"https://api.github.com/repos/coopdevs/katuma/milestones{/number}","notifications_url":"https://api.github.com/repos/coopdevs/katuma/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/coopdevs/katuma/labels{/name}","releases_url":"https://api.github.com/repos/coopdevs/katuma/releases{/id}","deployments_url":"https://api.github.com/repos/coopdevs/katuma/deployments","created_at":"2013-04-02T18:20:14Z","updated_at":"2016-07-19T15:14:56Z","pushed_at":"2016-10-07T18:20:24Z","git_url":"git://github.com/coopdevs/katuma.git","ssh_url":"git@github.com:coopdevs/katuma.git","clone_url":"https://github.com/coopdevs/katuma.git","svn_url":"https://github.com/coopdevs/katuma","homepage":"http://www.katuma.org","size":2132,"stargazers_count":15,"watchers_count":15,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":8,"mirror_url":null,"open_issues_count":8,"forks":8,"open_issues":8,"watchers":15,"default_branch":"develop"}},"base":{"label":"coopdevs:develop","ref":"develop","sha":"8255fc68e96363d45882748c4f5173ecf264ff8c","user":{"login":"coopdevs","id":4038308,"avatar_url":"https://avatars.githubusercontent.com/u/4038308?v=3","gravatar_id":"","url":"https://api.github.com/users/coopdevs","html_url":"https://github.com/coopdevs","followers_url":"https://api.github.com/users/coopdevs/followers","following_url":"https://api.github.com/users/coopdevs/following{/other_user}","gists_url":"https://api.github.com/users/coopdevs/gists{/gist_id}","starred_url":"https://api.github.com/users/coopdevs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coopdevs/subscriptions","organizations_url":"https://api.github.com/users/coopdevs/orgs","repos_url":"https://api.github.com/users/coopdevs/repos","events_url":"https://api.github.com/users/coopdevs/events{/privacy}","received_events_url":"https://api.github.com/users/coopdevs/received_events","type":"Organization","site_admin":false},"repo":{"id":9176730,"name":"katuma","full_name":"coopdevs/katuma","owner":{"login":"coopdevs","id":4038308,"avatar_url":"https://avatars.githubusercontent.com/u/4038308?v=3","gravatar_id":"","url":"https://api.github.com/users/coopdevs","html_url":"https://github.com/coopdevs","followers_url":"https://api.github.com/users/coopdevs/followers","following_url":"https://api.github.com/users/coopdevs/following{/other_user}","gists_url":"https://api.github.com/users/coopdevs/gists{/gist_id}","starred_url":"https://api.github.com/users/coopdevs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coopdevs/subscriptions","organizations_url":"https://api.github.com/users/coopdevs/orgs","repos_url":"https://api.github.com/users/coopdevs/repos","events_url":"https://api.github.com/users/coopdevs/events{/privacy}","received_events_url":"https://api.github.com/users/coopdevs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/coopdevs/katuma","description":"Katuma backend API","fork":false,"url":"https://api.github.com/repos/coopdevs/katuma","forks_url":"https://api.github.com/repos/coopdevs/katuma/forks","keys_url":"https://api.github.com/repos/coopdevs/katuma/keys{/key_id}","collaborators_url":"https://api.github.com/repos/coopdevs/katuma/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/coopdevs/katuma/teams","hooks_url":"https://api.github.com/repos/coopdevs/katuma/hooks","issue_events_url":"https://api.github.com/repos/coopdevs/katuma/issues/events{/number}","events_url":"https://api.github.com/repos/coopdevs/katuma/events","assignees_url":"https://api.github.com/repos/coopdevs/katuma/assignees{/user}","branches_url":"https://api.github.com/repos/coopdevs/katuma/branches{/branch}","tags_url":"https://api.github.com/repos/coopdevs/katuma/tags","blobs_url":"https://api.github.com/repos/coopdevs/katuma/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/coopdevs/katuma/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/coopdevs/katuma/git/refs{/sha}","trees_url":"https://api.github.com/repos/coopdevs/katuma/git/trees{/sha}","statuses_url":"https://api.github.com/repos/coopdevs/katuma/statuses/{sha}","languages_url":"https://api.github.com/repos/coopdevs/katuma/languages","stargazers_url":"https://api.github.com/repos/coopdevs/katuma/stargazers","contributors_url":"https://api.github.com/repos/coopdevs/katuma/contributors","subscribers_url":"https://api.github.com/repos/coopdevs/katuma/subscribers","subscription_url":"https://api.github.com/repos/coopdevs/katuma/subscription","commits_url":"https://api.github.com/repos/coopdevs/katuma/commits{/sha}","git_commits_url":"https://api.github.com/repos/coopdevs/katuma/git/commits{/sha}","comments_url":"https://api.github.com/repos/coopdevs/katuma/comments{/number}","issue_comment_url":"https://api.github.com/repos/coopdevs/katuma/issues/comments{/number}","contents_url":"https://api.github.com/repos/coopdevs/katuma/contents/{+path}","compare_url":"https://api.github.com/repos/coopdevs/katuma/compare/{base}...{head}","merges_url":"https://api.github.com/repos/coopdevs/katuma/merges","archive_url":"https://api.github.com/repos/coopdevs/katuma/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/coopdevs/katuma/downloads","issues_url":"https://api.github.com/repos/coopdevs/katuma/issues{/number}","pulls_url":"https://api.github.com/repos/coopdevs/katuma/pulls{/number}","milestones_url":"https://api.github.com/repos/coopdevs/katuma/milestones{/number}","notifications_url":"https://api.github.com/repos/coopdevs/katuma/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/coopdevs/katuma/labels{/name}","releases_url":"https://api.github.com/repos/coopdevs/katuma/releases{/id}","deployments_url":"https://api.github.com/repos/coopdevs/katuma/deployments","created_at":"2013-04-02T18:20:14Z","updated_at":"2016-07-19T15:14:56Z","pushed_at":"2016-10-07T18:20:24Z","git_url":"git://github.com/coopdevs/katuma.git","ssh_url":"git@github.com:coopdevs/katuma.git","clone_url":"https://github.com/coopdevs/katuma.git","svn_url":"https://github.com/coopdevs/katuma","homepage":"http://www.katuma.org","size":2132,"stargazers_count":15,"watchers_count":15,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":8,"mirror_url":null,"open_issues_count":8,"forks":8,"open_issues":8,"watchers":15,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/coopdevs/katuma/pulls/87"},"html":{"href":"https://github.com/coopdevs/katuma/pull/87"},"issue":{"href":"https://api.github.com/repos/coopdevs/katuma/issues/87"},"comments":{"href":"https://api.github.com/repos/coopdevs/katuma/issues/87/comments"},"review_comments":{"href":"https://api.github.com/repos/coopdevs/katuma/pulls/87/comments"},"review_comment":{"href":"https://api.github.com/repos/coopdevs/katuma/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/coopdevs/katuma/pulls/87/commits"},"statuses":{"href":"https://api.github.com/repos/coopdevs/katuma/statuses/040bccff2a8147fc34866a22a2922577463c89ee"}}}}
{"actor":{"display_login":"enricostano"}}