Skip to main content

Class: ClaimService

Hierarchy

  • "medusa-interfaces"

    ClaimService

Constructors

constructor

new ClaimService(__namedParameters)

Parameters

NameType
__namedParametersObject

Overrides

BaseService.constructor

Defined in

services/claim.js:14

Properties

addressRepo_

addressRepo_: any

Defined in

services/claim.js:36


claimItemService_

claimItemService_: any

Defined in

services/claim.js:37


claimRepository_

claimRepository_: any

Defined in

services/claim.js:38


eventBus_

eventBus_: any

Defined in

services/claim.js:39


fulfillmentProviderService_

fulfillmentProviderService_: any

Defined in

services/claim.js:40


fulfillmentService_

fulfillmentService_: any

Defined in

services/claim.js:41


inventoryService_

inventoryService_: any

Defined in

services/claim.js:42


lineItemService_

lineItemService_: any

Defined in

services/claim.js:43


paymentProviderService_

paymentProviderService_: any

Defined in

services/claim.js:44


regionService_

regionService_: any

Defined in

services/claim.js:45


returnService_

returnService_: any

Defined in

services/claim.js:46


shippingOptionService_

shippingOptionService_: any

Defined in

services/claim.js:47


taxProviderService_

taxProviderService_: any

Defined in

services/claim.js:48


totalsService_

totalsService_: any

Defined in

services/claim.js:49


Events

Static Events: Object

Type declaration

NameType
CANCELEDstring
CREATEDstring
FULFILLMENT_CREATEDstring
REFUND_PROCESSEDstring
SHIPMENT_CREATEDstring
UPDATEDstring

Defined in

services/claim.js:5

Methods

cancel

cancel(id): Promise<any>

Parameters

NameType
idany

Returns

Promise<any>

Defined in

services/claim.js:644


cancelFulfillment

cancelFulfillment(fulfillmentId): Promise<any>

Parameters

NameType
fulfillmentIdany

Returns

Promise<any>

Defined in

services/claim.js:512


create

create(data): any

Creates a Claim on an Order. Claims consists of items that are claimed and optionally items to be sent as replacement for the claimed items. The shipping address that the new items will be shipped to

Parameters

NameTypeDescription
dataanythe object containing all data required to create a claim

Returns

any

created claim

Defined in

services/claim.js:159


createFulfillment

createFulfillment(id, config?): Claim

Parameters

NameTypeDescription
idstringthe object containing all data required to create a claim
configObjectconfig object
config.metadataanyconfig metadata
config.no_notificationundefined | booleanconfig no notification

Returns

Claim

created claim

Defined in

services/claim.js:378


createShipment

createShipment(id, fulfillmentId, trackingLinks, config?): Promise<any>

Parameters

NameTypeDefault value
idanyundefined
fulfillmentIdanyundefined
trackingLinksanyundefined
configObjectundefined
config.metadataObject{}
config.no_notificationundefinedundefined

Returns

Promise<any>

Defined in

services/claim.js:577


deleteMetadata

deleteMetadata(orderId, key): Promise<any>

Dedicated method to delete metadata for an order.

Parameters

NameTypeDescription
orderIdstringthe order to delete metadata from.
keystringkey for metadata field

Returns

Promise<any>

resolves to the updated result.

Defined in

services/claim.js:734


list

list(selector, config?): Promise<any>

Parameters

NameTypeDescription
selectoranythe query object for find
configanythe config object containing query settings

Returns

Promise<any>

the result of the find operation

Defined in

services/claim.js:696


processRefund

processRefund(id): Promise<any>

Parameters

NameType
idany

Returns

Promise<any>

Defined in

services/claim.js:535


retrieve

retrieve(claimId, config?): Promise<Order>

Gets an order by id.

Parameters

NameTypeDescription
claimIdstringid of order to retrieve
configanythe config object containing query settings

Returns

Promise<Order>

the order document

Defined in

services/claim.js:711


update

update(id, data): any

Parameters

NameType
idany
dataany

Returns

any

Defined in

services/claim.js:80


withTransaction

withTransaction(manager): ClaimService

Parameters

NameType
managerany

Returns

ClaimService

Defined in

services/claim.js:52