{"action":"created","comment":{"url":"https://api.github.com/repos/EcomDev/magento2/pulls/comments/38638083","id":38638083,"diff_hunk":"@@ -0,0 +1,115 @@\n+<?php\n+\n+namespace Magento\\CatalogInventory\\Api\\Data;\n+use Magento\\Framework\\Api\\ExtensibleDataInterface;\n+\n+/**\n+ * Warehouse record interface\n+ *\n+ * It is used only to manage stock status\n+ * qty of non virtual warehouse inventory\n+ *\n+ * @api\n+ */\n+interface WarehouseRecordInterface extends ExtensibleDataInterface\n+{\n+    /**\n+     * Returns identifier of inventory record\n+     *\n+     * @return int\n+     */\n+    public function getId();\n+\n+    /**\n+     * Returns identifier of assigned product\n+     *\n+     * @return int\n+     */\n+    public function getProductId();\n+\n+    /**\n+     * Returns identifier of assigned inventory\n+     *\n+     * @return int\n+     */\n+    public function getInventoryId();\n+\n+    /**\n+     * Returns available quantity of product in the specified warehouse\n+     *\n+     * @return float\n+     */\n+    public function getQuantity();\n+\n+    /**\n+     * Sets available quantity of product in the specified warehouse\n+     *\n+     * @param float $quantity\n+     * @return $this\n+     */\n+    public function setQuantity($quantity);\n+\n+    /**\n+     * Sets a stock status for an item\n+     *\n+     * @param int $flag\n+     * @return $this\n+     */\n+    public function setIsSalable($flag);\n+\n+    /**\n+     * Sets availability status code for warehouse record\n+     *\n+     * @param string $code\n+     * @return $this\n+     */\n+    public function setAvailabilityStatusCode($code);\n+\n+    /**\n+     * Returns availability status code for warehouse record\n+     *\n+     * @return string\n+     */\n+    public function getAvailabilityStatusCode();\n+\n+    /**\n+     * Returns instance of inventory interface\n+     *\n+     * Object should be set by inventory record repository\n+     *\n+     * @return InventoryInterface\n+     */\n+    public function getInventory();","path":"app/code/Magento/CatalogInventory/Api/Data/WarehouseRecordInterface.php","position":82,"original_position":82,"commit_id":"6295a73a057802192a672a78a082545758f6ecd6","original_commit_id":"6295a73a057802192a672a78a082545758f6ecd6","user":{"login":"IvanChepurnyi","id":866758,"avatar_url":"https://avatars.githubusercontent.com/u/866758?v=3","gravatar_id":"","url":"https://api.github.com/users/IvanChepurnyi","html_url":"https://github.com/IvanChepurnyi","followers_url":"https://api.github.com/users/IvanChepurnyi/followers","following_url":"https://api.github.com/users/IvanChepurnyi/following{/other_user}","gists_url":"https://api.github.com/users/IvanChepurnyi/gists{/gist_id}","starred_url":"https://api.github.com/users/IvanChepurnyi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IvanChepurnyi/subscriptions","organizations_url":"https://api.github.com/users/IvanChepurnyi/orgs","repos_url":"https://api.github.com/users/IvanChepurnyi/repos","events_url":"https://api.github.com/users/IvanChepurnyi/events{/privacy}","received_events_url":"https://api.github.com/users/IvanChepurnyi/received_events","type":"User","site_admin":false},"body":"@maghamed:\r\nI wanted to avoid extending warehouse directly from it, as the business logic of inventory contract must not be duplicated in warehouse entities, which are used for managing first ones. Maybe it makes sense to create something like the following:\r\n\r\nInventoryInterface -> InventoryDataInterface \r\nWarehouseInterface -> InventoryDataInterface\r\n\r\nIn this case, InventoryDataInterface contains all getter methods, that are shared between warehouse entity and inventory entity.\r\n\r\n@maghamed, @vkorotun \r\nAlso after taking a look one more time at my proposal I want to optimize similar logic of configuration retrieval by introducing ConfigurationAwareInterface. It should contain  getConfiguration() contract logic for InventoryInterface, InventoryRecordInterface.\r\nAnd on the admin part:\r\nBoth WarehouseConfiguration and WarehouseRecordConfiguration will be based\r\nBaseConfigurationInterface, that contains same setters and getters for both contracts.\r\n","created_at":"2015-09-03T12:06:24Z","updated_at":"2015-09-03T12:06:24Z","html_url":"https://github.com/EcomDev/magento2/pull/1#discussion_r38638083","pull_request_url":"https://api.github.com/repos/EcomDev/magento2/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/EcomDev/magento2/pulls/comments/38638083"},"html":{"href":"https://github.com/EcomDev/magento2/pull/1#discussion_r38638083"},"pull_request":{"href":"https://api.github.com/repos/EcomDev/magento2/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/EcomDev/magento2/pulls/1","id":43876674,"html_url":"https://github.com/EcomDev/magento2/pull/1","diff_url":"https://github.com/EcomDev/magento2/pull/1.diff","patch_url":"https://github.com/EcomDev/magento2/pull/1.patch","issue_url":"https://api.github.com/repos/EcomDev/magento2/issues/1","number":1,"state":"open","locked":false,"title":"Multi-stock proposal","user":{"login":"IvanChepurnyi","id":866758,"avatar_url":"https://avatars.githubusercontent.com/u/866758?v=3","gravatar_id":"","url":"https://api.github.com/users/IvanChepurnyi","html_url":"https://github.com/IvanChepurnyi","followers_url":"https://api.github.com/users/IvanChepurnyi/followers","following_url":"https://api.github.com/users/IvanChepurnyi/following{/other_user}","gists_url":"https://api.github.com/users/IvanChepurnyi/gists{/gist_id}","starred_url":"https://api.github.com/users/IvanChepurnyi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IvanChepurnyi/subscriptions","organizations_url":"https://api.github.com/users/IvanChepurnyi/orgs","repos_url":"https://api.github.com/users/IvanChepurnyi/repos","events_url":"https://api.github.com/users/IvanChepurnyi/events{/privacy}","received_events_url":"https://api.github.com/users/IvanChepurnyi/received_events","type":"User","site_admin":false},"body":"This is not an actual pull request for Magento 2.0. It has been created to review the changes, before doing the final proposal to Magento Core.","created_at":"2015-09-01T13:43:17Z","updated_at":"2015-09-03T12:06:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"302cc97876f74e03dbaea51891cdaa27ecbea063","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/EcomDev/magento2/pulls/1/commits","review_comments_url":"https://api.github.com/repos/EcomDev/magento2/pulls/1/comments","review_comment_url":"https://api.github.com/repos/EcomDev/magento2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/EcomDev/magento2/issues/1/comments","statuses_url":"https://api.github.com/repos/EcomDev/magento2/statuses/6295a73a057802192a672a78a082545758f6ecd6","head":{"label":"EcomDev:multiple_inventory","ref":"multiple_inventory","sha":"6295a73a057802192a672a78a082545758f6ecd6","user":{"login":"EcomDev","id":1301975,"avatar_url":"https://avatars.githubusercontent.com/u/1301975?v=3","gravatar_id":"","url":"https://api.github.com/users/EcomDev","html_url":"https://github.com/EcomDev","followers_url":"https://api.github.com/users/EcomDev/followers","following_url":"https://api.github.com/users/EcomDev/following{/other_user}","gists_url":"https://api.github.com/users/EcomDev/gists{/gist_id}","starred_url":"https://api.github.com/users/EcomDev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EcomDev/subscriptions","organizations_url":"https://api.github.com/users/EcomDev/orgs","repos_url":"https://api.github.com/users/EcomDev/repos","events_url":"https://api.github.com/users/EcomDev/events{/privacy}","received_events_url":"https://api.github.com/users/EcomDev/received_events","type":"Organization","site_admin":false},"repo":{"id":41426191,"name":"magento2","full_name":"EcomDev/magento2","owner":{"login":"EcomDev","id":1301975,"avatar_url":"https://avatars.githubusercontent.com/u/1301975?v=3","gravatar_id":"","url":"https://api.github.com/users/EcomDev","html_url":"https://github.com/EcomDev","followers_url":"https://api.github.com/users/EcomDev/followers","following_url":"https://api.github.com/users/EcomDev/following{/other_user}","gists_url":"https://api.github.com/users/EcomDev/gists{/gist_id}","starred_url":"https://api.github.com/users/EcomDev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EcomDev/subscriptions","organizations_url":"https://api.github.com/users/EcomDev/orgs","repos_url":"https://api.github.com/users/EcomDev/repos","events_url":"https://api.github.com/users/EcomDev/events{/privacy}","received_events_url":"https://api.github.com/users/EcomDev/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/EcomDev/magento2","description":"All Submissions you make to Magento, an eBay Inc. company (“Magento”) through GitHub are subject to the following terms and conditions: (1)You grant Magento a perpetual, worldwide, non-exclusive, no charge, royalty free, irrevocable      license under your applicable copyrights and patents to reproduce, prepare derivative works of, display, publically perform, sublicense and distribute any feedback, ideas, code, or other information (“Submission”) you submit through GitHub. (2)Your Submission is an original work of authorship and you are the owner or are legally entitled to grant the license stated above. (3)You agree to the Contributor License Agreement found here:  https://github.com/magento/magento2/blob/master/CONTRIBUTOR_LICENSE_AGREEMENT.html","fork":true,"url":"https://api.github.com/repos/EcomDev/magento2","forks_url":"https://api.github.com/repos/EcomDev/magento2/forks","keys_url":"https://api.github.com/repos/EcomDev/magento2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/EcomDev/magento2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/EcomDev/magento2/teams","hooks_url":"https://api.github.com/repos/EcomDev/magento2/hooks","issue_events_url":"https://api.github.com/repos/EcomDev/magento2/issues/events{/number}","events_url":"https://api.github.com/repos/EcomDev/magento2/events","assignees_url":"https://api.github.com/repos/EcomDev/magento2/assignees{/user}","branches_url":"https://api.github.com/repos/EcomDev/magento2/branches{/branch}","tags_url":"https://api.github.com/repos/EcomDev/magento2/tags","blobs_url":"https://api.github.com/repos/EcomDev/magento2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/EcomDev/magento2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/EcomDev/magento2/git/refs{/sha}","trees_url":"https://api.github.com/repos/EcomDev/magento2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/EcomDev/magento2/statuses/{sha}","languages_url":"https://api.github.com/repos/EcomDev/magento2/languages","stargazers_url":"https://api.github.com/repos/EcomDev/magento2/stargazers","contributors_url":"https://api.github.com/repos/EcomDev/magento2/contributors","subscribers_url":"https://api.github.com/repos/EcomDev/magento2/subscribers","subscription_url":"https://api.github.com/repos/EcomDev/magento2/subscription","commits_url":"https://api.github.com/repos/EcomDev/magento2/commits{/sha}","git_commits_url":"https://api.github.com/repos/EcomDev/magento2/git/commits{/sha}","comments_url":"https://api.github.com/repos/EcomDev/magento2/comments{/number}","issue_comment_url":"https://api.github.com/repos/EcomDev/magento2/issues/comments{/number}","contents_url":"https://api.github.com/repos/EcomDev/magento2/contents/{+path}","compare_url":"https://api.github.com/repos/EcomDev/magento2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/EcomDev/magento2/merges","archive_url":"https://api.github.com/repos/EcomDev/magento2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/EcomDev/magento2/downloads","issues_url":"https://api.github.com/repos/EcomDev/magento2/issues{/number}","pulls_url":"https://api.github.com/repos/EcomDev/magento2/pulls{/number}","milestones_url":"https://api.github.com/repos/EcomDev/magento2/milestones{/number}","notifications_url":"https://api.github.com/repos/EcomDev/magento2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/EcomDev/magento2/labels{/name}","releases_url":"https://api.github.com/repos/EcomDev/magento2/releases{/id}","created_at":"2015-08-26T13:08:52Z","updated_at":"2015-08-26T13:09:35Z","pushed_at":"2015-09-01T18:52:13Z","git_url":"git://github.com/EcomDev/magento2.git","ssh_url":"git@github.com:EcomDev/magento2.git","clone_url":"https://github.com/EcomDev/magento2.git","svn_url":"https://github.com/EcomDev/magento2","homepage":"http://www.magento.com","size":223593,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"develop"}},"base":{"label":"EcomDev:develop","ref":"develop","sha":"84c18e392997eb65a02a60858621d34f6dff050e","user":{"login":"EcomDev","id":1301975,"avatar_url":"https://avatars.githubusercontent.com/u/1301975?v=3","gravatar_id":"","url":"https://api.github.com/users/EcomDev","html_url":"https://github.com/EcomDev","followers_url":"https://api.github.com/users/EcomDev/followers","following_url":"https://api.github.com/users/EcomDev/following{/other_user}","gists_url":"https://api.github.com/users/EcomDev/gists{/gist_id}","starred_url":"https://api.github.com/users/EcomDev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EcomDev/subscriptions","organizations_url":"https://api.github.com/users/EcomDev/orgs","repos_url":"https://api.github.com/users/EcomDev/repos","events_url":"https://api.github.com/users/EcomDev/events{/privacy}","received_events_url":"https://api.github.com/users/EcomDev/received_events","type":"Organization","site_admin":false},"repo":{"id":41426191,"name":"magento2","full_name":"EcomDev/magento2","owner":{"login":"EcomDev","id":1301975,"avatar_url":"https://avatars.githubusercontent.com/u/1301975?v=3","gravatar_id":"","url":"https://api.github.com/users/EcomDev","html_url":"https://github.com/EcomDev","followers_url":"https://api.github.com/users/EcomDev/followers","following_url":"https://api.github.com/users/EcomDev/following{/other_user}","gists_url":"https://api.github.com/users/EcomDev/gists{/gist_id}","starred_url":"https://api.github.com/users/EcomDev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EcomDev/subscriptions","organizations_url":"https://api.github.com/users/EcomDev/orgs","repos_url":"https://api.github.com/users/EcomDev/repos","events_url":"https://api.github.com/users/EcomDev/events{/privacy}","received_events_url":"https://api.github.com/users/EcomDev/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/EcomDev/magento2","description":"All Submissions you make to Magento, an eBay Inc. company (“Magento”) through GitHub are subject to the following terms and conditions: (1)You grant Magento a perpetual, worldwide, non-exclusive, no charge, royalty free, irrevocable      license under your applicable copyrights and patents to reproduce, prepare derivative works of, display, publically perform, sublicense and distribute any feedback, ideas, code, or other information (“Submission”) you submit through GitHub. (2)Your Submission is an original work of authorship and you are the owner or are legally entitled to grant the license stated above. (3)You agree to the Contributor License Agreement found here:  https://github.com/magento/magento2/blob/master/CONTRIBUTOR_LICENSE_AGREEMENT.html","fork":true,"url":"https://api.github.com/repos/EcomDev/magento2","forks_url":"https://api.github.com/repos/EcomDev/magento2/forks","keys_url":"https://api.github.com/repos/EcomDev/magento2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/EcomDev/magento2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/EcomDev/magento2/teams","hooks_url":"https://api.github.com/repos/EcomDev/magento2/hooks","issue_events_url":"https://api.github.com/repos/EcomDev/magento2/issues/events{/number}","events_url":"https://api.github.com/repos/EcomDev/magento2/events","assignees_url":"https://api.github.com/repos/EcomDev/magento2/assignees{/user}","branches_url":"https://api.github.com/repos/EcomDev/magento2/branches{/branch}","tags_url":"https://api.github.com/repos/EcomDev/magento2/tags","blobs_url":"https://api.github.com/repos/EcomDev/magento2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/EcomDev/magento2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/EcomDev/magento2/git/refs{/sha}","trees_url":"https://api.github.com/repos/EcomDev/magento2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/EcomDev/magento2/statuses/{sha}","languages_url":"https://api.github.com/repos/EcomDev/magento2/languages","stargazers_url":"https://api.github.com/repos/EcomDev/magento2/stargazers","contributors_url":"https://api.github.com/repos/EcomDev/magento2/contributors","subscribers_url":"https://api.github.com/repos/EcomDev/magento2/subscribers","subscription_url":"https://api.github.com/repos/EcomDev/magento2/subscription","commits_url":"https://api.github.com/repos/EcomDev/magento2/commits{/sha}","git_commits_url":"https://api.github.com/repos/EcomDev/magento2/git/commits{/sha}","comments_url":"https://api.github.com/repos/EcomDev/magento2/comments{/number}","issue_comment_url":"https://api.github.com/repos/EcomDev/magento2/issues/comments{/number}","contents_url":"https://api.github.com/repos/EcomDev/magento2/contents/{+path}","compare_url":"https://api.github.com/repos/EcomDev/magento2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/EcomDev/magento2/merges","archive_url":"https://api.github.com/repos/EcomDev/magento2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/EcomDev/magento2/downloads","issues_url":"https://api.github.com/repos/EcomDev/magento2/issues{/number}","pulls_url":"https://api.github.com/repos/EcomDev/magento2/pulls{/number}","milestones_url":"https://api.github.com/repos/EcomDev/magento2/milestones{/number}","notifications_url":"https://api.github.com/repos/EcomDev/magento2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/EcomDev/magento2/labels{/name}","releases_url":"https://api.github.com/repos/EcomDev/magento2/releases{/id}","created_at":"2015-08-26T13:08:52Z","updated_at":"2015-08-26T13:09:35Z","pushed_at":"2015-09-01T18:52:13Z","git_url":"git://github.com/EcomDev/magento2.git","ssh_url":"git@github.com:EcomDev/magento2.git","clone_url":"https://github.com/EcomDev/magento2.git","svn_url":"https://github.com/EcomDev/magento2","homepage":"http://www.magento.com","size":223593,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/EcomDev/magento2/pulls/1"},"html":{"href":"https://github.com/EcomDev/magento2/pull/1"},"issue":{"href":"https://api.github.com/repos/EcomDev/magento2/issues/1"},"comments":{"href":"https://api.github.com/repos/EcomDev/magento2/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/EcomDev/magento2/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/EcomDev/magento2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/EcomDev/magento2/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/EcomDev/magento2/statuses/6295a73a057802192a672a78a082545758f6ecd6"}}}}