Add groundClose method for Ground End of Day Close API#3
Merged
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…CCLOSE, rename to groundClose The FedEx Ground End of Day Close API uses PUT /ship/v1/endofday/ for close operations (POST is for reprinting). The closeReqType is GCDR, and groundServiceCategory + closeDate are required fields. There is no SmartPost-specific close in the REST API. Renamed method from close to groundClose to match the API scope and align with fulfillment-service consumption patterns. All methods, tests, and docs are alphabetized. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Coverage Report for CI Build 25896737409Coverage remained the same at 100.0%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Mirrors the FedEx API name ("Ground End of Day Close") in the method
symbol the same way the other methods do (cancelShipment, createShipment,
etc.).
- index.js: this.groundClose -> this.groundEndOfDayClose
- README.md / CHANGELOG.md: section heading + code examples
- test/index.js: outer test() block names + fedex.* call sites
- package.json: keyword "ground-close" -> "ground-end-of-day-close"
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or 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
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.
Summary
groundClose(closeRequest, options)— calls the FedEx Ground End of Day Close API (PUT /ship/v1/endofday/). Same passthrough pattern as the other methods: caller supplies the full request body, the package forwards it verbatim.Migration notes for fulfillment-service
The SOAP
groundclosecall maps to REST as follows:accountNumber: { value }in request bodyTimeUpToWhichShipmentsAreToBeClosed(ISO datetime)closeDate(YYYY-MM-DD date only)closeReqType: 'GCDR'groundServiceCategory: 'GROUND'SmartPost close has no REST equivalent
The FedEx REST Close API (
/ship/v1/endofday/) only supports Ground close (GCDR). There is noSPCLOSEor SmartPost-specific close operation. The fulfillment-service'ssmartpostclosecron (fedEx.js:68) will need a different approach when migrating off SOAP.Other callouts
PUT, notPOST—POSTon the same endpoint is for reprinting end-of-day documents (RGCDR), not closing. This is unusual for a create-like operation and easy to get wrong.closeDateis date-only — the SOAP field accepted a full ISO datetime; the REST field isYYYY-MM-DD. The test usesnew Date().toISOString().slice(0, 10)./ship/v1/endofday/(with trailing slash). Requests without it may behave differently.Test plan
groundClosewithGCDRagainstapis-sandbox.fedex.com)🤖 Generated with Claude Code