Skip to content

Conversation

@RickKukiela
Copy link
Contributor

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/order and shopper_activity/product.
  • Caller must use the params (Argument 3) in the constructor to set api_end_point to https://api.getdrip.com/v3/ to use the shopper activity endpoint. If v3 is 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.

- Added 3 methods (with v3 endpoint check) for `shopper_activity/cart`, `shopper_activity/order` and `shopper_activity/product`.
- Added TODO for tests. I'm not familiar with how the tests should be set up for this so I'm not going to do it my self but the maintainers can feel free to add them.
@BenSandeen BenSandeen self-assigned this Mar 12, 2025
@BenSandeen BenSandeen merged commit b311483 into DripEmail:main Mar 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants