-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Order API resources updated. #20169 #20170
Order API resources updated. #20169 #20170
Conversation
Hi @milindsingh. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @milindsingh thanks for the contribution! Please see my code review notes
</resources> | ||
</route> | ||
<route url="/V1/invoices/:id/void" method="POST"> | ||
<service class="Magento\Sales\Api\InvoiceManagementInterface" method="setVoid"/> | ||
<resources> | ||
<resource ref="Magento_Sales::sales" /> | ||
<resource ref="Magento_Sales::sales_invoice" /> | ||
<!--TODO: review--> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks OK to me, please remove the TODO
</resources> | ||
</route> | ||
<route url="/V1/transactions/:id" method="GET"> | ||
<service class="Magento\Sales\Api\TransactionRepositoryInterface" method="get"/> | ||
<resources> | ||
<resource ref="Magento_Sales::sales" /> | ||
<resource ref="Magento_Sales::transactions" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think Magento_Sales::transactions_fetch
is more appropriate for viewing transactions (read only).
</resources> | ||
</route> | ||
<route url="/V1/transactions" method="GET"> | ||
<service class="Magento\Sales\Api\TransactionRepositoryInterface" method="getList"/> | ||
<resources> | ||
<resource ref="Magento_Sales::sales" /> | ||
<resource ref="Magento_Sales::transactions" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think Magento_Sales::transactions_fetch
is more appropriate for viewing transactions (read only).
</resources> | ||
</route> | ||
<route url="/V1/orders/:id/comments" method="GET"> | ||
<service class="Magento\Sales\Api\OrderManagementInterface" method="getCommentsList"/> | ||
<resources> | ||
<resource ref="Magento_Sales::sales" /> | ||
<resource ref="Magento_Sales::comment" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we use Magento_Sales::actions_view
here, considering that Magento_Sales::comment
is used only for adding comments currently?
@sivaschenko Thanks for the review. I have updated the code as suggested. |
Hi @sivaschenko, thank you for the review. |
Hi @milindsingh, thank you for your contribution! |
Hi @milindsingh. Thank you for your contribution. |
Description (*)
Fixed Issues (if relevant)
Manual testing scenarios (*)
Contribution checklist (*)