CreateSku Method (String, String, String, Decimal, StockStatus, Decimal)
Creates an inventory SKU with the stock out threshold and variant identifier.
Namespace: Microsoft.CommerceServer.Inventory
Assembly: Microsoft.CommerceServer.Catalog (in Microsoft.CommerceServer.Catalog.dll)
Syntax
'Declaration
Public Function CreateSku ( _
productCatalogName As String, _
productId As String, _
variantId As String, _
quantity As Decimal, _
status As StockStatus, _
stockOutThreshold As Decimal _
) As InventorySku
'Usage
Dim instance As InventoryCatalog
Dim productCatalogName As String
Dim productId As String
Dim variantId As String
Dim quantity As Decimal
Dim status As StockStatus
Dim stockOutThreshold As Decimal
Dim returnValue As InventorySku
returnValue = instance.CreateSku(productCatalogName, _
productId, variantId, quantity, status, _
stockOutThreshold)
public InventorySku CreateSku(
string productCatalogName,
string productId,
string variantId,
decimal quantity,
StockStatus status,
decimal stockOutThreshold
)
public:
InventorySku^ CreateSku(
String^ productCatalogName,
String^ productId,
String^ variantId,
Decimal quantity,
StockStatus status,
Decimal stockOutThreshold
)
public function CreateSku(
productCatalogName : String,
productId : String,
variantId : String,
quantity : decimal,
status : StockStatus,
stockOutThreshold : decimal
) : InventorySku
Parameters
- productCatalogName
Type: System..::.String
The product catalog name.
- productId
Type: System..::.String
The product unique identifier.
- variantId
Type: System..::.String
The variant unique identifier.
- quantity
Type: System..::.Decimal
The inventory SKU quantity.
- status
Type: Microsoft.CommerceServer.Catalog..::.StockStatus
The SKU status.
- stockOutThreshold
Type: System..::.Decimal
The stock out threshold for the SKU.
Return Value
Type: Microsoft.CommerceServer.Inventory..::.InventorySku
An InventorySku object containing information about the inventory SKU.
The stock out threshold is nothing more than a value that the SKU’s quantity must be above or equal to be considered in-stock. e.g. 1 or 0. Usually a low, safe value.
Remarks
Creates a product in the inventory catalog and returns an InventorySku class.
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.