selling-partner-api icon indicating copy to clipboard operation
selling-partner-api copied to clipboard

Update Deserializes.php - Add DateTime format

Open simonsolutions opened this issue 1 year ago • 3 comments

Add additional DateTime Format returned from Amazon ProductFeeV0 API

simonsolutions avatar Jun 25 '24 15:06 simonsolutions

Thanks! Would you mind adding a test supporting this?

jlevers avatar Jun 25 '24 16:06 jlevers

A test should be in PR https://github.com/jlevers/selling-partner-api/pull/743 ? It seems already been added there by someone else

simonsolutions avatar Jun 26 '24 10:06 simonsolutions

That PR had some issues, because it had code included from another PR. If you wouldn't mind writing a test that uses the endpoint where you encountered the error, that would be great!

jlevers avatar Jun 26 '24 16:06 jlevers

@simonsolutions when I asked you to combine #752, I just meant you could copy the code from that PR to this one. I'm going to assume you'll do that, and write my comments on that PR's code here.

I missed that you hadn't changed which request was being mocked – it looks like you copied and pasted the previous test without changing the mocks.

Since the API credentials supplied to the $connector in your test are invalid, if you ran that test it would give you an error. You'd need to mock the request/response that you're actually testing – in this case, GetMyFeesEstimateForSKU. However, that's not actaully necessary in this case. As I said in my comments in the other PR, check out this test for how you might go about testing this: https://github.com/jlevers/selling-partner-api/blob/main/tests/Seller/ProductFeesV0/Responses/GetMyFeesEstimateResponseTest.php.

Also, as I said in the other PR, please move the test to tests/Seller/ProductFeesV0/Responses/GetMyFeesEstimateResponseTest.php.

In general, please do not push tests (or other code) that you haven't actually run.

jlevers avatar Jul 09 '24 19:07 jlevers

Sorry I'm confused what you now exactly want. I think it would be easier and with less misunderstanding if you put the code in the right place?!

simonsolutions avatar Jul 09 '24 19:07 simonsolutions