Skip to content

Commit 63e4792

Browse files
Update inventory integration test for cross-location adjustment fields
InventoryAdjustment.locationId was replaced by fromLocationId/toLocationId in the 2026-07-15 API version; the API now rejects adjustments without from_location_id. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent d5986ee commit 63e4792

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

‎tests/Integration/InventoryTest.php‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ public static function setUpBeforeClass(): void
9494
$adjustment = new InventoryAdjustment([
9595
'fromState' => 'NONE',
9696
'toState' => 'IN_STOCK',
97-
'locationId' => self::$locationId,
97+
'fromLocationId' => self::$locationId,
98+
'toLocationId' => self::$locationId,
9899
'catalogObjectId' => self::$itemVariationId,
99100
'quantity' => '100',
100101
'occurredAt' => (new DateTimeImmutable())->sub(new DateInterval('PT8H'))->format(DateTimeInterface::ATOM),
@@ -174,7 +175,8 @@ public function testBatchChangeInventory(): void
174175
$adjustment = new InventoryAdjustment([
175176
'fromState' => 'NONE',
176177
'toState' => 'IN_STOCK',
177-
'locationId' => self::$locationId,
178+
'fromLocationId' => self::$locationId,
179+
'toLocationId' => self::$locationId,
178180
'catalogObjectId' => self::$itemVariationId,
179181
'quantity' => '50', // Different quantity than setup
180182
'occurredAt' => (new DateTimeImmutable())->format(DateTimeInterface::ATOM),
@@ -281,7 +283,8 @@ public function testRetrieveInventoryAdjustment(): void
281283
$adjustment = new InventoryAdjustment([
282284
'fromState' => 'NONE',
283285
'toState' => 'IN_STOCK',
284-
'locationId' => self::$locationId,
286+
'fromLocationId' => self::$locationId,
287+
'toLocationId' => self::$locationId,
285288
'catalogObjectId' => self::$itemVariationId,
286289
'quantity' => '10',
287290
'occurredAt' => (new DateTimeImmutable())->format(DateTimeInterface::ATOM),

0 commit comments

Comments
 (0)