Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/endpoints/multi-location-inventories.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class MultiLocationInventories {
}

Create(body, productId) {
return this.request.send(`${this.endpoint}}`, 'POST', {
return this.request.send(`${this.endpoint}`, 'POST', {
type: 'stock',
id: productId,
attributes: body
Expand Down Expand Up @@ -63,6 +63,11 @@ class MultiLocationInventories {
this.offset = value
return this
}

Filter(filter) {
this.filter = filter
return this
}
}

export default MultiLocationInventories
8 changes: 8 additions & 0 deletions src/types/multi-location-inventories.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ export interface StockResponse extends Identifiable {
timestamps: Timestamps
}

export interface MultiLocationInventoryFilter {
eq?: {
locations?: string
}
}

/**
* Multi Location Inventories Endpoint Interface
*/
Expand Down Expand Up @@ -121,4 +127,6 @@ export interface MultiLocationInventoriesEndpoint {
Limit(value: number): MultiLocationInventoriesEndpoint

Offset(value: number): MultiLocationInventoriesEndpoint

Filter(filter: MultiLocationInventoryFilter): MultiLocationInventoriesEndpoint
}
Loading