Skip to content

Commit ea44a53

Browse files
feat: MLI added filter for location
1 parent fe64e57 commit ea44a53

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

src/endpoints/multi-location-inventories.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class MultiLocationInventories {
3535
}
3636

3737
Create(body, productId) {
38-
return this.request.send(`${this.endpoint}}`, 'POST', {
38+
return this.request.send(`${this.endpoint}`, 'POST', {
3939
type: 'stock',
4040
id: productId,
4141
attributes: body
@@ -63,6 +63,11 @@ class MultiLocationInventories {
6363
this.offset = value
6464
return this
6565
}
66+
67+
Filter(filter) {
68+
this.filter = filter
69+
return this
70+
}
6671
}
6772

6873
export default MultiLocationInventories

src/types/multi-location-inventories.d.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@ export interface StockResponse extends Identifiable {
7474
timestamps: Timestamps
7575
}
7676

77+
export interface MultiLocationInventoryFilter {
78+
eq?: {
79+
locations?: string
80+
}
81+
}
82+
7783
/**
7884
* Multi Location Inventories Endpoint Interface
7985
*/
@@ -121,4 +127,6 @@ export interface MultiLocationInventoriesEndpoint {
121127
Limit(value: number): MultiLocationInventoriesEndpoint
122128

123129
Offset(value: number): MultiLocationInventoriesEndpoint
130+
131+
Filter(filter: MultiLocationInventoryFilter): MultiLocationInventoriesEndpoint
124132
}

0 commit comments

Comments
 (0)