@commercetools-test-data/inventory-entry
v10.11.1
Published
Data model for commercetools API InventoryEntry
Downloads
6,157
Readme
@commercetools-test-data/inventory-entry
This package provides the data model for the commercetools platform InventoryEntry
type
https://docs.commercetools.com/api/projects/inventory#inventoryentry
Install
$ yarn add -D @commercetools-test-data/inventory-entry
Usage
import {
InventoryEntryRest,
InventoryEntryDraftRest,
InventoryEntryGraphql,
InventoryEntryDraftGraphql,
} from '@commercetools-test-data/inventory-entry';
const inventoryEntryRest = InventoryEntryRest.random().build();
const inventoryEntryDraftRest = InventoryEntryDraftRest.random().build();
const inventoryEntryGraphql = InventoryEntryGraphql.random().build();
const inventoryEntryDraftGraphql = InventoryEntryDraftGraphql.random().build();
For backwards compatibility, we still support using the generic data models, but you should consider them legacy as we will be removing them in the future.
import type {
TInventoryEntry,
TInventoryEntryDraft,
} from '@commercetools-test-data/inventory-entry';
import * as InventoryEntry from '@commercetools-test-data/inventory-entry';
const inventoryEntry = InventoryEntry.random().build<TInventoryEntry>();
const inventoryEntryDraft =
InventoryEntry.InventoryEntryDraft.random().build<TInventoryEntryDraft>();