drip-php
drip-php copied to clipboard
Adds shopper_activity v3 end points
Background
The current SDK does not allow for v3 shopper activity endpoint calls necessary for updating shopping cart data, and ordering data. This update adds the ability to do that.
Modification
- Cleaned up php doc block refs to use imported / simplified class references for @throws \Exception => @throws Exception and @return \Drip\RepsonseInterface => @return ResponseInterface
- Added 3 methods (with v3 endpoint check) for
shopper_activity/cart,shopper_activity/orderandshopper_activity/product. - Caller must use the params (Argument 3) in the constructor to set
api_end_pointtohttps://api.getdrip.com/v3/to use the shopper activity endpoint. Ifv3is not found in the current end point url, and error will be thrown. This information should be added to the README.md or general docs page. (not done by me). - Added TODO comment for tests. I'm not familiar with how the tests should be set up for this so I'm not going to do it myself but the maintainers can feel free to add them.
Result
Provides the ability to use the v3 shopper_activity/cart, shopper_activity/order and shopper_activity/product end points.
Additional Context
N/A
How to verify/test
I did not have time to create new tests for this work as I'm not quite following how your tests are done and I'm not super experienced with TDD so I inserted a TODO comment where the tests should be added. I have tested this manually against the production servers on a product site and the three new endpoints seem to function correctly.