Skip to main content
Skip to main content

Transformer

Transformer: (item?: LineItem, quantity?: number, additional?: OrdersReturnItem) => Promise<DeepPartial<LineItem>> | DeepPartial<LineItem>

Type declaration

(item?, quantity?, additional?): Promise&#60;DeepPartial&#60;[LineItem](/references/services/classes/LineItem)&#62;&#62; \| DeepPartial&#60;[LineItem](/references/services/classes/LineItem)&#62;

Parameters

Line Items are created when a product is added to a Cart. When Line Items are purchased they will get copied to the resulting order, swap, or claim, and can eventually be referenced in Fulfillments and Returns. Line items may also be used for order edits.
quantitynumber

Returns

Promise<DeepPartial<LineItem>> | DeepPartial<LineItem>

Promise&#60;DeepPartial&#60;LineItem&#62;&#62; \| DeepPartial&#60;LineItem&#62;Promise<DeepPartial<LineItem>> | DeepPartial<LineItem>
Was this section helpful?