-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
B 18491 update endpoint for updateMTOServiceItem MAIN #11909
Merged
deandreJones
merged 8 commits into
main
from
B-18491-update-endpoint-updateMTOServiceItem-MAIN
Feb 12, 2024
Merged
B 18491 update endpoint for updateMTOServiceItem MAIN #11909
deandreJones
merged 8 commits into
main
from
B-18491-update-endpoint-updateMTOServiceItem-MAIN
Feb 12, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
danieljordan-caci
approved these changes
Feb 8, 2024
cameroncaci
approved these changes
Feb 12, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commit hashes are good
deandreJones
approved these changes
Feb 12, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
INTEGRATION PR: #11908
Agility ticket
Summary
The updateMTOServiceItem only allows a service item without a SITDestinationFinalAddress field value to be created. It does not allow updates of the SITDestinationFinalAddress value if it already exists.
Since we populate the SITDestinationFinalAddress for destination SIT service items DDASIT, DDDSIT, DDFSIT, and DDSFSC at the time of destination SIT request/creation, there will never be a case where a destination SIT service item has an empty SITDestinationFinalAddress field, so this endpoint can never update that SITDestinationFinalAddress field.
Based on those findings, a new v2 endpoint was not needed. Instead, I added the four destination service codes as an explicit check that ensures the final destination address field cannot be updated. The added check does not break any functionality, it just clearly documents what was already happening based on the current logic in place.
I updated the error message to be more informative and to direct end users to update the shipment destination address if they want to update the destination SIT service item's final destination address.
I also expanded tests to reflect this functionality and updated the documentation for the endpoint.
The updateMTOServiceItem does allow the SITDestinationFinalAddress field value to be created for origin SIT service items, however, that column being populated for origin SIT service items is not relevant to SIT calculations. Instead, we are focusing on the destination SIT service items and their SITDestinationFinalAddress value.
How to test
{
"modelType": "UpdateMTOServiceItemSIT",
"SITDestinationFinalAddress": {
"ID": "62e795f4-61a8-4cca-b59d-028345c07b89",
"StreetAddress1": "Maria Street Address 1",
"City": "Herington",
"State": "KS",
"PostalCode": "66667",
"Country": "United States"
}
}