---
displayed_sidebar: servicesSidebar
---

import ParameterTypes from "@site/src/components/ParameterTypes"

# ClaimItemService

## constructor

### Parameters

<ParameterTypes parameters={[{"name":"__namedParameters","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.claimImageRepository","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.claimItemRepository","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.claimTagRepository","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.eventBusService","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__namedParameters.lineItemService","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />

___

## Properties

<ParameterTypes parameters={[{"name":"__container__","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"claimImageRepository_","type":"Repository&#60;[ClaimImage](../../entities/classes/entities.ClaimImage.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"claimItemRepository_","type":"Repository&#60;[ClaimItem](../../entities/classes/entities.ClaimItem.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"claimTagRepository_","type":"Repository&#60;[ClaimTag](../../entities/classes/entities.ClaimTag.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"eventBus_","type":"[EventBusService](services.EventBusService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItemService_","type":"[LineItemService](services.LineItemService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"manager_","type":"`EntityManager`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager_","type":"`undefined` \\| `EntityManager`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"Events.CANCELED","type":"`string`","description":"","optional":false,"defaultValue":"\"claim_item.canceled\"","expandable":false,"children":[]},{"name":"Events.CREATED","type":"`string`","description":"","optional":false,"defaultValue":"\"claim_item.created\"","expandable":false,"children":[]},{"name":"Events.UPDATED","type":"`string`","description":"","optional":false,"defaultValue":"\"claim_item.updated\"","expandable":false,"children":[]},{"name":"__configModule__","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"__moduleDeclaration__","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} />

___

## Accessors

### activeManager\_

#### Returns

<ParameterTypes parameters={[{"name":"EntityManager","type":"`EntityManager`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} />

___

## Methods

### atomicPhase\_

Wraps some work within a transactional block. If the service already has
a transaction manager attached this will be reused, otherwise a new
transaction manager is created.

#### Type Parameters

<ParameterTypes parameters={[{"name":"TResult","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"TError","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />

#### Parameters

<ParameterTypes parameters={[{"name":"work","type":"(`transactionManager`: `EntityManager`) => Promise&#60;TResult&#62;","description":"the transactional work to be done","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationOrErrorHandler","type":"`IsolationLevel` \\| (`error`: `TError`) => Promise&#60;void \\| TResult&#62;","description":"the isolation level to be used for the work.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"maybeErrorHandlerOrDontFail","type":"(`error`: `TError`) => Promise&#60;void \\| TResult&#62;","description":"Potential error handler","optional":true,"defaultValue":"","expandable":false,"children":[]}]} />

#### Returns

<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;TResult&#62;","optional":false,"defaultValue":"","description":"the result of the transactional work","expandable":false,"children":[]}]} />

___

### create

#### Parameters

<ParameterTypes parameters={[{"name":"data","type":"`CreateClaimItemInput`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />

#### Returns

<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ClaimItem](../../entities/classes/entities.ClaimItem.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} />

___

### list

#### Parameters

<ParameterTypes parameters={[{"name":"selector","type":"[Selector](../../medusa/types/medusa.Selector.mdx)&#60;[ClaimItem](../../entities/classes/entities.ClaimItem.mdx)&#62;","description":"the query object for find","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[ClaimItem](../../entities/classes/entities.ClaimItem.mdx)&#62;","description":"the config object for find","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />

#### Returns

<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ClaimItem](../../entities/classes/entities.ClaimItem.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the result of the find operation","expandable":false,"children":[]}]} />

___

### retrieve

Gets a claim item by id.

#### Parameters

<ParameterTypes parameters={[{"name":"claimItemId","type":"`string`","description":"id of ClaimItem to retrieve","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"[FindConfig](../../medusa/interfaces/medusa.FindConfig.mdx)&#60;[ClaimItem](../../entities/classes/entities.ClaimItem.mdx)&#62;","description":"configuration for the find operation","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} />

#### Returns

<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ClaimItem](../../entities/classes/entities.ClaimItem.mdx)&#62;","optional":false,"defaultValue":"","description":"the ClaimItem","expandable":false,"children":[]}]} />

___

### shouldRetryTransaction\_

#### Parameters

<ParameterTypes parameters={[{"name":"err","type":"`Record<string, unknown>` \\| `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />

#### Returns

<ParameterTypes parameters={[{"name":"boolean","type":"`boolean`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} />

___

### update

#### Parameters

<ParameterTypes parameters={[{"name":"id","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />

#### Returns

<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ClaimItem](../../entities/classes/entities.ClaimItem.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} />

___

### withTransaction

#### Parameters

<ParameterTypes parameters={[{"name":"transactionManager","type":"`EntityManager`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} />

#### Returns

<ParameterTypes parameters={[{"name":"ClaimItemService","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />
