Skip to content

Commit

Permalink
Improved: Added pagination support in get inventory count import item…
Browse files Browse the repository at this point in the history
…s api. Also added an endpoint to fetch import items (#18).
  • Loading branch information
ravilodhi committed Jul 29, 2024
1 parent d1188f5 commit 09541f5
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
17 changes: 14 additions & 3 deletions service/co/hotwax/cycleCount/InventoryCountServices.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,22 @@

<service verb="get" noun="InventoryCountImportItemDetails">
<description>Service to get Inventory Count Import Item details.</description>
<in-parameters><parameter name="inventoryCountImportId" required="true"/></in-parameters>
<!--Pass the inventoryCountImportId to fetch items of a particular Inventory Count only -->
<in-parameters>
<parameter name="inventoryCountImportId" required="false"/>
<parameter name="statusId"/>
<parameter name="viewIndex" type="Integer" default-value="0">
<description>The current view index to get the inventory count import items.</description>
</parameter>
<parameter name="viewSize" type="Integer" default-value="100">
<description>The maximum number of inventory count import items to display.</description>
</parameter>
</in-parameters>
<out-parameters><parameter name="itemList" type="List"/></out-parameters>
<actions>
<entity-find entity-name="co.hotwax.warehouse.InventoryCountImportItemView" list="invCountImpItemItr">
<econdition field-name="inventoryCountImportId"/>
<entity-find entity-name="co.hotwax.warehouse.InventoryCountImportItemView" list="invCountImpItemItr" offset="viewIndex * viewSize" limit="viewSize">
<econdition field-name="inventoryCountImportId" ignore-if-empty="true"/>
<econdition field-name="statusId" ignore-if-empty="true"/>
<use-iterator/>
</entity-find>
<set field="itemList" from="[]"/>
Expand Down
8 changes: 8 additions & 0 deletions service/inventorycount.rest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@
<resource name="cycleCounts">
<method type="get"><entity name="co.hotwax.warehouse.InventoryCountImportView" operation="list"/></method>
<method type="post"><service name="co.hotwax.cycleCount.InventoryCountServices.create#InventoryCountImport"/></method>
<!-- Inventory Cycle Count API:
** GET /inventory-cycle-count/cycleCounts/items - Get all inventory cycle count items. This is useful for preparing cycle count and detailed CSV file.
TODO: Need to prepare a generic endpoint that can return csv data
-->
<resource name="items">
<method type="get"><service name="co.hotwax.cycleCount.InventoryCountServices.get#InventoryCountImportItemDetails"/></method>
</resource>

<!-- Inventory Cycle Count API:
** GET /inventory-cycle-count/cycleCounts/{inventoryCountImportId} - get inventory cycle count import
** PUT /inventory-cycle-count/cycleCounts/{inventoryCountImportId} - update inventory cycle count import
Expand Down

0 comments on commit 09541f5

Please sign in to comment.