Skip to content

Update Inventory Level Resource - #43

Open
imRohan wants to merge 1 commit into
mainfrom
rl-update-fake-il
Open

Update Inventory Level Resource#43
imRohan wants to merge 1 commit into
mainfrom
rl-update-fake-il

Conversation

@imRohan

@imRohan imRohan commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

The Inventory Level resource was returning an object which was not optimized for readability. Clients would have been required to adjust the object in order to consume the inventory level iteratively. This PR hopes to improve the readability of the Inventory Level object, and includes a serializer which was previously missing while removing a previously unused fake object, DistributionCenterInventory

This change addresses the need by:

  • Updating how InventoryLevel objects are built
  • Adding a serializer
  • Cleaning up the Fake, updating it to the new agreed upon spec

@imRohan
imRohan requested review from chriswoodford and jmazur August 4, 2026 15:05
@imRohan imRohan self-assigned this Aug 4, 2026
@imRohan
imRohan force-pushed the rl-update-fake-il branch from e63740f to 732dc95 Compare August 7, 2026 14:51
end
end
end
end

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question about this, i added a comment on the gobble Pr that uses this. why make a serializer class vs adding the to_json method in the original model? This serializer isn't adding much else in terms of functionality. it isnt acting like a regular rails serializer, only to_json

@chriswoodford chriswoodford left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re-read the PR description and just clean it up a bit

The inventory level structure has changed, and the API will now be
returning a simplified, flatter response structure. Due to this, the
InventoryLevel object needs to be refactored to take into account the
new response structure and the new top-level key.

This change addresses the need by:
* Updating the Inventory Level response fake
* Updating Inventory Level to account for the new key name
@imRohan
imRohan force-pushed the rl-update-fake-il branch from de77580 to 432a578 Compare August 14, 2026 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants