Closed jaredh159 closed 2 years ago
yeah, probably should be done. Lulu has changed prices and added some more fees in the Covid shipping era, I'm guessing our prices have drifted decently...
probably need to include this: https://help.api.lulu.com/en/support/solutions/articles/64000265990-per-order-fulfillment-fee
done in API/database refactor sprint of 2021/2022.
Right now the math checks out, but it's possible they could raise prices and we not be aware. We need to periodically test the pricing algorithm in
CartItem
against the real api data.The simplest would probably be to send our expected
unitPrice
to the/print-job/fees
endpoint, because we have the info from Lulu within that function. We could verify that we get what we expect, and log a high-priority error if not.Alternatively, we could do an integration test that gets run periodically or something like that, where we directly hit their API and confirm pricing. One of the problems with that approach is that our live account is getting grandfathered in to old pricing, so our sandbox account gets different prices. 🤔