-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
Deprecate existing coupon codes methods #2958
Deprecate existing coupon codes methods #2958
Conversation
66eac4c
to
4559a00
Compare
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.
Great job!! Just a small concern, should we test somewhere that users can't add a coupon code to someone else's orders? That should be handled by the permissions system but I'm not sure we are using that here. Can you please take a look?
Noted @kennyadsl 👌 let me have a look on that |
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.
👍
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.
Thanks!
solidusio/solidus#2958 replaced `order_coupon_code` text field for `coupon_code`, which broke master build. This patch fixes this regression.
solidusio/solidus#2958 replaced `order_coupon_code` text field for `coupon_code`, which broke master build. This patch fixes this regression.
solidusio/solidus#2958 replaced `order_coupon_code` text field for `coupon_code`, which broke master build. This patch fixes this regression.
solidusio/solidus#2958 replaced `order_coupon_code` text field for `coupon_code`, which broke master build. This patch fixes this regression.
Hi! 👋
Following @kennyadsl's idea on #2327, this PR aims to deprecate current endpoints used to apply coupon codes (on orders and checkout) and replace them with a new API endpoint properly named
Spree::Api::CouponCodesController
. This was also done for thefrontend
withSpree::CouponCodesController
.I think this approach allows a better separation of concerns and it's easier to reason about. Plus, it'd be easier to implement a built-in solution for #1641.
I'm open to suggestions!