feat(inventory): add Inventory endpoint family - #242
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). Error responses surface through the SDK's existing CheckoutApiException, documented in method docstrings rather than a dedicated error class.
🟡 Risk Classification: MINORApproval route: AI Review + Human Approval Classification reasons
Operational gates
Files analysed: 7 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 InventoryClient with 10 endpoints wired into CheckoutApi; the structure follows existing SDK patterns correctly, but there are concrete issues around the 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 |
Extract the ~30 fields identical between InventoryProductKnowledge and InventorySetProductRequest into an InventoryMerchandisingFields base class. Fixes the SonarCloud duplication gate (32.4% on new code) without changing the serialized shape of either class.
🟡 Risk Classification: MINORApproval route: AI Review + Human Approval Classification reasons
Operational gates
Files analysed: 7 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 |
|



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 (agentic:inventorywas already present inOAuthScopes).Also verified the same swagger diff's
PaymentSessionCaptureFlag/PaymentSessionCaptureOnand
PaymentInterfacesPanPreference/PaymentInterfacesProvisionNetworkTokenschemaextraction: confirmed no-op for this SDK.
Changes
checkout_sdk/inventory/inventory.py— request/response classes (InventoryAdjustmentRequest,InventoryLevels, InventoryReservation, InventoryReservationItem,
InventoryReservationRequest, InventorySetLevelsRequest, InventoryProductKnowledge,
InventorySetProductRequest, InventoryHalLink, InventoryMoney) and enums
checkout_sdk/inventory/inventory_client.py— newInventoryClient, all 10 methods.Error shape (
request_id,error_type,error_codes,variant_id,available)documented in docstrings, surfaced via the SDK's existing
CheckoutApiExceptionratherthan a dedicated per-domain error class
checkout_sdk/checkout_api.py— wired the new client intests/inventory/— client and serialization tests, 677 passing overallAPI 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.