abuzuhri / Amazon-SP-API-CSharp

.Net C# library for the new Amazon Selling Partner API
MIT License
217 stars 191 forks source link

FulFillmentInboundServicev20240320.ListDeliveryWindowOptionsAsync return dates as null #781

Open dmelendez35 opened 1 month ago

dmelendez35 commented 1 month ago

The method FulFillmentInboundServicev20240320.ListDeliveryWindowOptionsAsync is returning the rows, however, all the date fields return null. When I test the same request in postman it returns the dates fields with values. The field "DeliveryWindowOptionId" is also null

See image image

dmelendez35 commented 1 month ago

So I tested creating a different model where the dates are of type 'string', I had to inherith the 'FulFillmentInboundServicev20240320' service in order to copy the method and make use of my modified model, and it worked! So the problem seems to be this line:

var response = await RequestClient.ExecuteAsync(Request, cancellationToken);

where RequestClient is unable to parse the date string in the fields "startDate", "endDate", "validUntil", and that also affects "DeliveryWindowOptionId" somehow. This is an example of the format in the fields: "2024-10-25T00:00Z" that is causing problems to be converted to DateTime? I believe.

So I appreciate any help fixing that, to avoid having to keep my inherited service

Baros6647 commented 3 weeks ago

So I tested creating a different model where the dates are of type 'string', I had to inherith the 'FulFillmentInboundServicev20240320' service in order to copy the method and make use of my modified model, and it worked! So the problem seems to be this line:

var response = await RequestClient.ExecuteAsync(Request, cancellationToken);

where RequestClient is unable to parse the date string in the fields "startDate", "endDate", "validUntil", and that also affects "DeliveryWindowOptionId" somehow. This is an example of the format in the fields: "2024-10-25T00:00Z" that is causing problems to be converted to DateTime? I believe.

So I appreciate any help fixing that, to avoid having to keep my inherited service

Hi! This error is already fixed. The fix was waiting for approving and now it is approved.