Interface: UseProduct
react-autonomy.UseProduct
UseProduct contains the data and methods returned by the useProduct hook.
• createStockRequest: (options: CreateStockRequest) => Promise<void>
▸ (options): Promise<void>
The createStockRequest adds the customer to a product variant wait list in the OMS. When the variant is marked back in stock, customers on the wait list will automatically receive an email notification.
Name | Type |
---|---|
options |
Promise<void>
A Promise that resolves when the stock request has been created.
• getPrice: (input: VariantPriceInput) => Promise<VariantPrice>
▸ (input): Promise<VariantPrice>
The getPrice method returns the price (including discount if applicable) for a produuct's variant by providing a SKU.
Name | Type |
---|---|
input |
Promise<VariantPrice>
A Promise that resolves with the price of the SKU.
• getStockAvailability: (input: VariantStockAvailabilityInput) => Promise<VariantStockAvailability>
▸ (input): Promise<VariantStockAvailability>
The getStockAvailability method returns the stock availability for a produuct's variant by providing a SKU.
Name | Type |
---|---|
input |
Promise<VariantStockAvailability>
A Promise that resolves with the stock availability of the SKU.