feat(inventory): add Inventory endpoint family - #380
Conversation
Implements the new agentic:inventory OAuth-scoped endpoints: stock adjustments, atomic multi-variant reservations (create/get/commit/release), stock levels (get/set), and beta product knowledge (get/set/delete). Responses stay untyped arrays and errors surface via CheckoutApiException, consistent with every other domain in this SDK.
🟡 Risk Classification: MINORApproval route: AI Review + Human Approval Classification reasons
Operational gates
Files analysed: 10 wall-e 2026.06.19-02 · policy |
🔬 Debug — why this classification?Each reason code emitted by the classifier, its source clause in the AI in SDLC Control Framework, and what it means.
Kinds:
See issue #3 for the proposal to formalise this map as Appendix A of the standards doc. wall-e 2026.06.19-02 · debug |
🟠 Advisory review: Concerns worth a lookThis PR needs a human approval. Before you give it, these are the things I'd want resolved. Adds a new Inventory API client with 10 endpoints, request/entity classes, and unit tests. The implementation is structurally consistent with the rest of the SDK, but there are several concrete problems worth resolving before approval. Concerns
This is not an approval. wall-e cannot auto-approve this PR — it is an opinion to help whoever does. Advisory review · us.anthropic.claude-sonnet-4-6 · wall-e 2026.06.19-02 |
|



Summary
Implements the new Inventory product added to the API on 2026-09-10: stock adjustments,
atomic multi-variant reservations (create/get/commit/release), stock levels (get/set), and
beta product knowledge (get/set/delete). All 10 endpoints require the OAuth scope
agentic:inventory, no secret/public key support, reusing this SDK's existingAuthorizationType::$oAuthclient pattern.Also verified the same swagger diff's
PaymentSessionCaptureFlag/PaymentSessionCaptureOnand
PaymentInterfacesPanPreference/PaymentInterfacesProvisionNetworkTokenschemaextraction: confirmed no-op for this SDK.
Changes
lib/Checkout/Inventory/InventoryClient.php— new client, all 10 methodslib/Checkout/Inventory/Requests/— InventoryAdjustmentRequest, InventoryReservationRequest,InventorySetLevelsRequest, InventorySetProductRequest
lib/Checkout/Inventory/Entities/— InventoryMoney, InventoryReservationItem,InventoryConditionType
lib/Checkout/CheckoutApi.php— wired the new client intest/Checkout/Tests/Inventory/InventoryClientTest.php— 10 tests, 23 assertionsResponses stay untyped arrays (
@return array), matching every other domain in this SDK;only request bodies get typed classes per this SDK's convention. No dedicated error-response
class either, since errors surface generically via
CheckoutApiException.API Reference
POST /inventory/adjustmentsPOST /inventory/reservationsGET /inventory/reservations/{id}POST /inventory/reservations/{id}/commitPOST /inventory/reservations/{id}/releaseGET /inventory/{variant_id}PUT /inventory/{variant_id}GET /inventory/{variant_id}/product(Beta)PUT /inventory/{variant_id}/product(Beta)DELETE /inventory/{variant_id}/product(Beta)Breaking changes
None. Purely additive.
README
No README changes needed.