Contributing updated FulfillmentOutbound source files #322
dave-sewell
started this conversation in
Show and tell
Replies: 3 comments 2 replies
-
Had to update and add some enum values in FulfillmentOutbound.CurrentStatus.cs ... |
Beta Was this translation helpful? Give feedback.
0 replies
-
@dave-sewell can you submit PULL REQUEST i will be very easy to know where exactly the change and merge to our library |
Beta Was this translation helpful? Give feedback.
2 replies
-
Thanks for the tip. I have forked, pushed the branch and submitted the pull request. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This library has saved us a lot of time. However, we struggled to get the functions in FulfillmentOutbound for Multi-Channel Fulfillment to work. We ended up forking a version of the source code and, after much effort and experimentation, making a lot of changes to source files in that section. We were successful in getting the following FulfillmentOutbound functions to work with several dozen live orders:
We would like to contribute the result of our effort in the hopes that it might save time for some of you wanting to use those functions. Not all parameters and variables were used or tested - but the code works for us in a production environment.
The attached files include a description of the changes and all the source files that were changed. We hope that the modified source files will be incorporated back into the library in some fashion so that we can go back to using the published version.
The biggest problem we ran into was member variable names that needed to be serialized or deserialized not matching the spelling in the SP-API documentation. This caused errors or missing data. We changed the spelling to match API docs whenever we encountered this problem. Interestingly, case does not matter on incoming data. We stuck with the library convention of upper case for the first character of the variable name even when API docs have the first character lower case. Case DOES matter for data being sent to the Amazon API. We handled that by changing the casing of the DataMember name to match API docs (for outgoing data only) but left the member variable name casing as it was - unless the spelling didn't match, in which case we changed the spelling to match API docs to avoid confusion.
We also ran into errors with the Timestamp variables. We got around that by changing the type to DateTime for required variables or to DateTime? for optional variables.
The Amazon API returns undocumented values for some of the enum types in the library, which caused deserialization errors. When we encountered this, we changed the type to string. We left as enum those that had a very limited number of values that seemed unlikely to change. Some of these needed [JsonConverter(typeofStringEnumConverter)] and EnumMember statements added so that the serialization/deserialization code would know how to translate between the enum values and corresponding strings.
One of the enums (ShippingSpeedCategory) was generating errors for a reason we were unable to determine, so we changed the type of that one to string also.
Hope this contribution is helpful to some of you and thanks again to our library author for saving a lot of us a lot of time.
Dave
CSharp SP-API Library Changes.docx
UpdatedFulfillmentOutboundSourceFiles.zip
Beta Was this translation helpful? Give feedback.
All reactions