Interfaces

Interface: UseProduct

react-autonomy.UseProduct

UseProduct contains the data and methods returned by the useProduct hook.

Properties

createStockRequest

createStockRequest: (options: CreateStockRequest) => Promise<void>

Type declaration

▸ (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.



JS


Parameters

Name

Type

options

Returns

Promise<void>

A Promise that resolves when the stock request has been created.

Defined in



getPrice

getPrice: (input: VariantPriceInput) => Promise<VariantPrice>

Type declaration

▸ (input): Promise<VariantPrice>

The getPrice method returns the price (including discount if applicable) for a produuct's variant by providing a SKU.



JS


Parameters

Name

Type

input

Returns

Promise<VariantPrice>

A Promise that resolves with the price of the SKU.

Defined in



getStockAvailability

getStockAvailability: (input: VariantStockAvailabilityInput) => Promise<VariantStockAvailability>

Type declaration

▸ (input): Promise<VariantStockAvailability>

The getStockAvailability method returns the stock availability for a produuct's variant by providing a SKU.



JS


Parameters

Name

Type

input

Returns

A Promise that resolves with the stock availability of the SKU.

Defined in