Skip to main content
Skip to main content

listLineItemAdjustments - Cart Module Reference

This documentation provides a reference to the listLineItemAdjustments method. This belongs to the Cart Module.

This method retrieves a paginated list of line item adjustments based on optional filters and configuration.

Example

To retrieve a list of line item adjustments using their IDs:

const lineItemAdjustments =
await cartModuleService.listLineItemAdjustments({
id: ["caliadj_123", "caliadj_321"],
})

To specify relations that should be retrieved within the line item adjustments:

const lineItemAdjustments =
await cartModuleService.listLineItemAdjustments(
{
id: ["caliadj_123", "caliadj_321"],
},
{
relations: ["item"],
}
)

By default, only the first 15 records are retrieved. You can control pagination by specifying the skip and take properties of the config parameter:

const lineItemAdjustments =
await cartModuleService.listLineItemAdjustments(
{
id: ["caliadj_123", "caliadj_321"],
},
{
relations: ["item"],
take: 20,
skip: 2,
}
)

Parameters

The filters to apply on the retrieved line item adjustments.
The configurations determining how the line item adjustment is retrieved. Its properties, such as select or relations, accept the attributes or relations associated with a line item adjustment.
sharedContextContext
A context used to share resources, such as transaction manager, between the application and the module.

Returns

PromisePromise<LineItemAdjustmentDTO[]>Required
The list of line item adjustments.
Was this section helpful?