{"action":"created","comment":{"url":"https://api.github.com/repos/reactioncommerce/reaction/pulls/comments/132995458","pull_request_review_id":56128736,"id":132995458,"diff_hunk":"@@ -899,6 +923,89 @@ export const methods = {\n     });\n \n     Hooks.Events.run(\"onOrderRefundCreated\", orderId);\n+  },\n+\n+  /**\n+   * orders/refund/create\n+   *\n+   * @summary Apply a refund to an already captured order\n+   * @param {String} orderId - order object\n+   * @param {Object} paymentMethod - paymentMethod object\n+   * @param {Array} returnItems - items to return\n+   * @param {Object} returnItemsInfo - info about return items\n+   * @return {null} no return value\n+   */\n+  \"orders/refunds/returnItems\": function (orderId, paymentMethod, returnItems, returnItemsInfo) {","path":"server/methods/core/orders.js","position":47,"original_position":47,"commit_id":"b039f878213f488e96a5d1b45008848e839d3568","original_commit_id":"b039f878213f488e96a5d1b45008848e839d3568","user":{"login":"kieha","id":19430095,"avatar_url":"https://avatars1.githubusercontent.com/u/19430095?v=4","gravatar_id":"","url":"https://api.github.com/users/kieha","html_url":"https://github.com/kieha","followers_url":"https://api.github.com/users/kieha/followers","following_url":"https://api.github.com/users/kieha/following{/other_user}","gists_url":"https://api.github.com/users/kieha/gists{/gist_id}","starred_url":"https://api.github.com/users/kieha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kieha/subscriptions","organizations_url":"https://api.github.com/users/kieha/orgs","repos_url":"https://api.github.com/users/kieha/repos","events_url":"https://api.github.com/users/kieha/events{/privacy}","received_events_url":"https://api.github.com/users/kieha/received_events","type":"User","site_admin":false},"body":"Method should have tests.","created_at":"2017-08-14T16:24:33Z","updated_at":"2017-08-14T16:24:33Z","html_url":"https://github.com/reactioncommerce/reaction/pull/2590#discussion_r132995458","pull_request_url":"https://api.github.com/repos/reactioncommerce/reaction/pulls/2590","_links":{"self":{"href":"https://api.github.com/repos/reactioncommerce/reaction/pulls/comments/132995458"},"html":{"href":"https://github.com/reactioncommerce/reaction/pull/2590#discussion_r132995458"},"pull_request":{"href":"https://api.github.com/repos/reactioncommerce/reaction/pulls/2590"}}},"pull_request":{"url":"https://api.github.com/repos/reactioncommerce/reaction/pulls/2590","id":132125088,"html_url":"https://github.com/reactioncommerce/reaction/pull/2590","diff_url":"https://github.com/reactioncommerce/reaction/pull/2590.diff","patch_url":"https://github.com/reactioncommerce/reaction/pull/2590.patch","issue_url":"https://api.github.com/repos/reactioncommerce/reaction/issues/2590","number":2590,"state":"open","locked":false,"title":"[Marketplace] Orders line items refund","user":{"login":"joykare","id":19430074,"avatar_url":"https://avatars1.githubusercontent.com/u/19430074?v=4","gravatar_id":"","url":"https://api.github.com/users/joykare","html_url":"https://github.com/joykare","followers_url":"https://api.github.com/users/joykare/followers","following_url":"https://api.github.com/users/joykare/following{/other_user}","gists_url":"https://api.github.com/users/joykare/gists{/gist_id}","starred_url":"https://api.github.com/users/joykare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joykare/subscriptions","organizations_url":"https://api.github.com/users/joykare/orgs","repos_url":"https://api.github.com/users/joykare/repos","events_url":"https://api.github.com/users/joykare/events{/privacy}","received_events_url":"https://api.github.com/users/joykare/received_events","type":"User","site_admin":false},"body":"Resolves #2377 \r\n\r\n**Notes**\r\n- `Include shipping` option doesn't work as of now coz there isn't a way to have separate shipping costs for individual line items\r\n\r\n**What to test**\r\n- The whole invoice card (Converted most of this into react) Make sure it works/looks as it did before\r\n- The line items popover:\r\n_Designs_\r\nhttps://app.zeplin.io/project/58af8900737c137280322bd6/screen/59360096eecad57cedd7c9a2\r\nhttps://app.zeplin.io/project/58af8900737c137280322bd6/screen/5936009418216793598a3118\r\nhttps://app.zeplin.io/project/58af8900737c137280322bd6/screen/5936009344d012c633a30693\r\n\r\n**How to test**\r\n- Clone branch\r\n- Log in as an admin\r\n- Make an order with more than 2 items (of the same variant) on your cart \r\n- Navigate to orders dashboard \r\n\r\n**Part 1:**\r\n- Make sure invoice card works as it did before\r\n- Approve, Capture and apply refund to make sure it still works\r\n\r\n**Part 2:**\r\n- Select a line item\r\n- Note popover opens \r\n- Edit line items to return some of the items ordered\r\n- Go over designs to make sure workflow matches\r\n- Check order on mongo `billing.paymentMethod/status` should be `partialRefund`\r\n- Select all items for refund and refund. \r\n- Check order on mongo `billing.paymentMethod/status` should be `refunded`\r\n\r\n","created_at":"2017-07-24T19:21:10Z","updated_at":"2017-08-14T16:24:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"daaed59036405879450ae54024fb2cdc69a7a6a9","assignee":null,"assignees":[],"requested_reviewers":[{"login":"zenweasel","id":72819,"avatar_url":"https://avatars1.githubusercontent.com/u/72819?v=4","gravatar_id":"","url":"https://api.github.com/users/zenweasel","html_url":"https://github.com/zenweasel","followers_url":"https://api.github.com/users/zenweasel/followers","following_url":"https://api.github.com/users/zenweasel/following{/other_user}","gists_url":"https://api.github.com/users/zenweasel/gists{/gist_id}","starred_url":"https://api.github.com/users/zenweasel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zenweasel/subscriptions","organizations_url":"https://api.github.com/users/zenweasel/orgs","repos_url":"https://api.github.com/users/zenweasel/repos","events_url":"https://api.github.com/users/zenweasel/events{/privacy}","received_events_url":"https://api.github.com/users/zenweasel/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/reactioncommerce/reaction/pulls/2590/commits","review_comments_url":"https://api.github.com/repos/reactioncommerce/reaction/pulls/2590/comments","review_comment_url":"https://api.github.com/repos/reactioncommerce/reaction/pulls/comments{/number}","comments_url":"https://api.github.com/repos/reactioncommerce/reaction/issues/2590/comments","statuses_url":"https://api.github.com/repos/reactioncommerce/reaction/statuses/b039f878213f488e96a5d1b45008848e839d3568","head":{"label":"reactioncommerce:joykare-orders-line-items-refund","ref":"joykare-orders-line-items-refund","sha":"b039f878213f488e96a5d1b45008848e839d3568","user":{"login":"reactioncommerce","id":5605462,"avatar_url":"https://avatars0.githubusercontent.com/u/5605462?v=4","gravatar_id":"","url":"https://api.github.com/users/reactioncommerce","html_url":"https://github.com/reactioncommerce","followers_url":"https://api.github.com/users/reactioncommerce/followers","following_url":"https://api.github.com/users/reactioncommerce/following{/other_user}","gists_url":"https://api.github.com/users/reactioncommerce/gists{/gist_id}","starred_url":"https://api.github.com/users/reactioncommerce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reactioncommerce/subscriptions","organizations_url":"https://api.github.com/users/reactioncommerce/orgs","repos_url":"https://api.github.com/users/reactioncommerce/repos","events_url":"https://api.github.com/users/reactioncommerce/events{/privacy}","received_events_url":"https://api.github.com/users/reactioncommerce/received_events","type":"Organization","site_admin":false},"repo":{"id":12926963,"name":"reaction","full_name":"reactioncommerce/reaction","owner":{"login":"reactioncommerce","id":5605462,"avatar_url":"https://avatars0.githubusercontent.com/u/5605462?v=4","gravatar_id":"","url":"https://api.github.com/users/reactioncommerce","html_url":"https://github.com/reactioncommerce","followers_url":"https://api.github.com/users/reactioncommerce/followers","following_url":"https://api.github.com/users/reactioncommerce/following{/other_user}","gists_url":"https://api.github.com/users/reactioncommerce/gists{/gist_id}","starred_url":"https://api.github.com/users/reactioncommerce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reactioncommerce/subscriptions","organizations_url":"https://api.github.com/users/reactioncommerce/orgs","repos_url":"https://api.github.com/users/reactioncommerce/repos","events_url":"https://api.github.com/users/reactioncommerce/events{/privacy}","received_events_url":"https://api.github.com/users/reactioncommerce/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/reactioncommerce/reaction","description":"Reaction is a customizable, real-time reactive, JavaScript commerce platform.","fork":false,"url":"https://api.github.com/repos/reactioncommerce/reaction","forks_url":"https://api.github.com/repos/reactioncommerce/reaction/forks","keys_url":"https://api.github.com/repos/reactioncommerce/reaction/keys{/key_id}","collaborators_url":"https://api.github.com/repos/reactioncommerce/reaction/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/reactioncommerce/reaction/teams","hooks_url":"https://api.github.com/repos/reactioncommerce/reaction/hooks","issue_events_url":"https://api.github.com/repos/reactioncommerce/reaction/issues/events{/number}","events_url":"https://api.github.com/repos/reactioncommerce/reaction/events","assignees_url":"https://api.github.com/repos/reactioncommerce/reaction/assignees{/user}","branches_url":"https://api.github.com/repos/reactioncommerce/reaction/branches{/branch}","tags_url":"https://api.github.com/repos/reactioncommerce/reaction/tags","blobs_url":"https://api.github.com/repos/reactioncommerce/reaction/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/reactioncommerce/reaction/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/reactioncommerce/reaction/git/refs{/sha}","trees_url":"https://api.github.com/repos/reactioncommerce/reaction/git/trees{/sha}","statuses_url":"https://api.github.com/repos/reactioncommerce/reaction/statuses/{sha}","languages_url":"https://api.github.com/repos/reactioncommerce/reaction/languages","stargazers_url":"https://api.github.com/repos/reactioncommerce/reaction/stargazers","contributors_url":"https://api.github.com/repos/reactioncommerce/reaction/contributors","subscribers_url":"https://api.github.com/repos/reactioncommerce/reaction/subscribers","subscription_url":"https://api.github.com/repos/reactioncommerce/reaction/subscription","commits_url":"https://api.github.com/repos/reactioncommerce/reaction/commits{/sha}","git_commits_url":"https://api.github.com/repos/reactioncommerce/reaction/git/commits{/sha}","comments_url":"https://api.github.com/repos/reactioncommerce/reaction/comments{/number}","issue_comment_url":"https://api.github.com/repos/reactioncommerce/reaction/issues/comments{/number}","contents_url":"https://api.github.com/repos/reactioncommerce/reaction/contents/{+path}","compare_url":"https://api.github.com/repos/reactioncommerce/reaction/compare/{base}...{head}","merges_url":"https://api.github.com/repos/reactioncommerce/reaction/merges","archive_url":"https://api.github.com/repos/reactioncommerce/reaction/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/reactioncommerce/reaction/downloads","issues_url":"https://api.github.com/repos/reactioncommerce/reaction/issues{/number}","pulls_url":"https://api.github.com/repos/reactioncommerce/reaction/pulls{/number}","milestones_url":"https://api.github.com/repos/reactioncommerce/reaction/milestones{/number}","notifications_url":"https://api.github.com/repos/reactioncommerce/reaction/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/reactioncommerce/reaction/labels{/name}","releases_url":"https://api.github.com/repos/reactioncommerce/reaction/releases{/id}","deployments_url":"https://api.github.com/repos/reactioncommerce/reaction/deployments","created_at":"2013-09-18T15:30:36Z","updated_at":"2017-08-14T14:26:00Z","pushed_at":"2017-08-14T16:16:55Z","git_url":"git://github.com/reactioncommerce/reaction.git","ssh_url":"git@github.com:reactioncommerce/reaction.git","clone_url":"https://github.com/reactioncommerce/reaction.git","svn_url":"https://github.com/reactioncommerce/reaction","homepage":"https://reactioncommerce.com/","size":37103,"stargazers_count":5246,"watchers_count":5246,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":981,"mirror_url":null,"open_issues_count":294,"forks":981,"open_issues":294,"watchers":5246,"default_branch":"master"}},"base":{"label":"reactioncommerce:marketplace","ref":"marketplace","sha":"700124530c8a70eff87c962c88e2b1c82ebe6c29","user":{"login":"reactioncommerce","id":5605462,"avatar_url":"https://avatars0.githubusercontent.com/u/5605462?v=4","gravatar_id":"","url":"https://api.github.com/users/reactioncommerce","html_url":"https://github.com/reactioncommerce","followers_url":"https://api.github.com/users/reactioncommerce/followers","following_url":"https://api.github.com/users/reactioncommerce/following{/other_user}","gists_url":"https://api.github.com/users/reactioncommerce/gists{/gist_id}","starred_url":"https://api.github.com/users/reactioncommerce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reactioncommerce/subscriptions","organizations_url":"https://api.github.com/users/reactioncommerce/orgs","repos_url":"https://api.github.com/users/reactioncommerce/repos","events_url":"https://api.github.com/users/reactioncommerce/events{/privacy}","received_events_url":"https://api.github.com/users/reactioncommerce/received_events","type":"Organization","site_admin":false},"repo":{"id":12926963,"name":"reaction","full_name":"reactioncommerce/reaction","owner":{"login":"reactioncommerce","id":5605462,"avatar_url":"https://avatars0.githubusercontent.com/u/5605462?v=4","gravatar_id":"","url":"https://api.github.com/users/reactioncommerce","html_url":"https://github.com/reactioncommerce","followers_url":"https://api.github.com/users/reactioncommerce/followers","following_url":"https://api.github.com/users/reactioncommerce/following{/other_user}","gists_url":"https://api.github.com/users/reactioncommerce/gists{/gist_id}","starred_url":"https://api.github.com/users/reactioncommerce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reactioncommerce/subscriptions","organizations_url":"https://api.github.com/users/reactioncommerce/orgs","repos_url":"https://api.github.com/users/reactioncommerce/repos","events_url":"https://api.github.com/users/reactioncommerce/events{/privacy}","received_events_url":"https://api.github.com/users/reactioncommerce/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/reactioncommerce/reaction","description":"Reaction is a customizable, real-time reactive, JavaScript commerce platform.","fork":false,"url":"https://api.github.com/repos/reactioncommerce/reaction","forks_url":"https://api.github.com/repos/reactioncommerce/reaction/forks","keys_url":"https://api.github.com/repos/reactioncommerce/reaction/keys{/key_id}","collaborators_url":"https://api.github.com/repos/reactioncommerce/reaction/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/reactioncommerce/reaction/teams","hooks_url":"https://api.github.com/repos/reactioncommerce/reaction/hooks","issue_events_url":"https://api.github.com/repos/reactioncommerce/reaction/issues/events{/number}","events_url":"https://api.github.com/repos/reactioncommerce/reaction/events","assignees_url":"https://api.github.com/repos/reactioncommerce/reaction/assignees{/user}","branches_url":"https://api.github.com/repos/reactioncommerce/reaction/branches{/branch}","tags_url":"https://api.github.com/repos/reactioncommerce/reaction/tags","blobs_url":"https://api.github.com/repos/reactioncommerce/reaction/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/reactioncommerce/reaction/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/reactioncommerce/reaction/git/refs{/sha}","trees_url":"https://api.github.com/repos/reactioncommerce/reaction/git/trees{/sha}","statuses_url":"https://api.github.com/repos/reactioncommerce/reaction/statuses/{sha}","languages_url":"https://api.github.com/repos/reactioncommerce/reaction/languages","stargazers_url":"https://api.github.com/repos/reactioncommerce/reaction/stargazers","contributors_url":"https://api.github.com/repos/reactioncommerce/reaction/contributors","subscribers_url":"https://api.github.com/repos/reactioncommerce/reaction/subscribers","subscription_url":"https://api.github.com/repos/reactioncommerce/reaction/subscription","commits_url":"https://api.github.com/repos/reactioncommerce/reaction/commits{/sha}","git_commits_url":"https://api.github.com/repos/reactioncommerce/reaction/git/commits{/sha}","comments_url":"https://api.github.com/repos/reactioncommerce/reaction/comments{/number}","issue_comment_url":"https://api.github.com/repos/reactioncommerce/reaction/issues/comments{/number}","contents_url":"https://api.github.com/repos/reactioncommerce/reaction/contents/{+path}","compare_url":"https://api.github.com/repos/reactioncommerce/reaction/compare/{base}...{head}","merges_url":"https://api.github.com/repos/reactioncommerce/reaction/merges","archive_url":"https://api.github.com/repos/reactioncommerce/reaction/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/reactioncommerce/reaction/downloads","issues_url":"https://api.github.com/repos/reactioncommerce/reaction/issues{/number}","pulls_url":"https://api.github.com/repos/reactioncommerce/reaction/pulls{/number}","milestones_url":"https://api.github.com/repos/reactioncommerce/reaction/milestones{/number}","notifications_url":"https://api.github.com/repos/reactioncommerce/reaction/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/reactioncommerce/reaction/labels{/name}","releases_url":"https://api.github.com/repos/reactioncommerce/reaction/releases{/id}","deployments_url":"https://api.github.com/repos/reactioncommerce/reaction/deployments","created_at":"2013-09-18T15:30:36Z","updated_at":"2017-08-14T14:26:00Z","pushed_at":"2017-08-14T16:16:55Z","git_url":"git://github.com/reactioncommerce/reaction.git","ssh_url":"git@github.com:reactioncommerce/reaction.git","clone_url":"https://github.com/reactioncommerce/reaction.git","svn_url":"https://github.com/reactioncommerce/reaction","homepage":"https://reactioncommerce.com/","size":37103,"stargazers_count":5246,"watchers_count":5246,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":981,"mirror_url":null,"open_issues_count":294,"forks":981,"open_issues":294,"watchers":5246,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/reactioncommerce/reaction/pulls/2590"},"html":{"href":"https://github.com/reactioncommerce/reaction/pull/2590"},"issue":{"href":"https://api.github.com/repos/reactioncommerce/reaction/issues/2590"},"comments":{"href":"https://api.github.com/repos/reactioncommerce/reaction/issues/2590/comments"},"review_comments":{"href":"https://api.github.com/repos/reactioncommerce/reaction/pulls/2590/comments"},"review_comment":{"href":"https://api.github.com/repos/reactioncommerce/reaction/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/reactioncommerce/reaction/pulls/2590/commits"},"statuses":{"href":"https://api.github.com/repos/reactioncommerce/reaction/statuses/b039f878213f488e96a5d1b45008848e839d3568"}}}}
{"actor":{"display_login":"kieha"}}