{"action":"opened","issue":{"url":"https://api.github.com/repos/Gadoma/walmart-api-php-client/issues/7","repository_url":"https://api.github.com/repos/Gadoma/walmart-api-php-client","labels_url":"https://api.github.com/repos/Gadoma/walmart-api-php-client/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/Gadoma/walmart-api-php-client/issues/7/comments","events_url":"https://api.github.com/repos/Gadoma/walmart-api-php-client/issues/7/events","html_url":"https://github.com/Gadoma/walmart-api-php-client/issues/7","id":306030494,"number":7,"title":"Product Service Get By UPC doesn't work","user":{"login":"jonrobinson","id":1872553,"avatar_url":"https://avatars3.githubusercontent.com/u/1872553?v=4","gravatar_id":"","url":"https://api.github.com/users/jonrobinson","html_url":"https://github.com/jonrobinson","followers_url":"https://api.github.com/users/jonrobinson/followers","following_url":"https://api.github.com/users/jonrobinson/following{/other_user}","gists_url":"https://api.github.com/users/jonrobinson/gists{/gist_id}","starred_url":"https://api.github.com/users/jonrobinson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonrobinson/subscriptions","organizations_url":"https://api.github.com/users/jonrobinson/orgs","repos_url":"https://api.github.com/users/jonrobinson/repos","events_url":"https://api.github.com/users/jonrobinson/events{/privacy}","received_events_url":"https://api.github.com/users/jonrobinson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-16T18:19:46Z","updated_at":"2018-03-16T18:19:46Z","closed_at":null,"author_association":"NONE","body":"`ProductService::getByUpc()` expects a single entity like the `getById()` call but it receives a collection. \r\n\r\nThis solves the issue:\r\n\r\n`\r\n/**\r\n * {@inheritdoc}\r\n */\r\npublic function getByUpc($upc)\r\n{\r\n        $this->guardString($upc);\r\n        \r\n        $collection = $this->getEntityCollection('items', ['upc' => $upc], self::COLLECTION_KEY);\r\n        return $collection->getFirst();\r\n}\r\n`"}}
{"actor":{"display_login":"jonrobinson"}}