Generated the following references: - `pricing` - `product` Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com> Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
984 lines
20 KiB
Plaintext
984 lines
20 KiB
Plaintext
---
|
|
displayed_sidebar: servicesSidebar
|
|
---
|
|
|
|
import ParameterTypes from "@site/src/components/ParameterTypes"
|
|
|
|
# ClaimService
|
|
|
|
## Constructors
|
|
|
|
### constructor
|
|
|
|
**new ClaimService**(`«destructured»`)
|
|
|
|
#### Parameters
|
|
|
|
<ParameterTypes parameters={[
|
|
{
|
|
"name": "__namedParameters",
|
|
"type": "[`InjectedDependencies`](../types/InjectedDependencies-4.mdx)",
|
|
"description": "",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"expandable": false,
|
|
"children": []
|
|
}
|
|
]} />
|
|
|
|
## Properties
|
|
|
|
<ParameterTypes parameters={[
|
|
{
|
|
"name": "__configModule__",
|
|
"type": "Record<`string`, `unknown`\\>",
|
|
"description": "",
|
|
"optional": true,
|
|
"defaultValue": "",
|
|
"expandable": false,
|
|
"children": []
|
|
},
|
|
{
|
|
"name": "__container__",
|
|
"type": "`any`",
|
|
"description": "",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"expandable": false,
|
|
"children": []
|
|
},
|
|
{
|
|
"name": "__moduleDeclaration__",
|
|
"type": "Record<`string`, `unknown`\\>",
|
|
"description": "",
|
|
"optional": true,
|
|
"defaultValue": "",
|
|
"expandable": false,
|
|
"children": []
|
|
},
|
|
{
|
|
"name": "addressRepository_",
|
|
"type": "`Repository`<[`Address`](Address.mdx)\\>",
|
|
"description": "",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"expandable": false,
|
|
"children": []
|
|
},
|
|
{
|
|
"name": "claimItemService_",
|
|
"type": "[`ClaimItemService`](ClaimItemService.mdx)",
|
|
"description": "",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"expandable": false,
|
|
"children": []
|
|
},
|
|
{
|
|
"name": "claimRepository_",
|
|
"type": "`Repository`<[`ClaimOrder`](ClaimOrder.mdx)\\>",
|
|
"description": "",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"expandable": false,
|
|
"children": []
|
|
},
|
|
{
|
|
"name": "eventBus_",
|
|
"type": "[`EventBusService`](EventBusService.mdx)",
|
|
"description": "",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"expandable": false,
|
|
"children": []
|
|
},
|
|
{
|
|
"name": "fulfillmentProviderService_",
|
|
"type": "[`FulfillmentProviderService`](FulfillmentProviderService.mdx)",
|
|
"description": "",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"expandable": false,
|
|
"children": []
|
|
},
|
|
{
|
|
"name": "fulfillmentService_",
|
|
"type": "[`FulfillmentService`](FulfillmentService.mdx)",
|
|
"description": "",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"expandable": false,
|
|
"children": []
|
|
},
|
|
{
|
|
"name": "lineItemRepository_",
|
|
"type": "`Repository`<[`LineItem`](LineItem.mdx)\\> & { `findByReturn`: Method findByReturn }",
|
|
"description": "",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"expandable": false,
|
|
"children": []
|
|
},
|
|
{
|
|
"name": "lineItemService_",
|
|
"type": "[`LineItemService`](LineItemService.mdx)",
|
|
"description": "",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"expandable": false,
|
|
"children": []
|
|
},
|
|
{
|
|
"name": "manager_",
|
|
"type": "`EntityManager`",
|
|
"description": "",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"expandable": false,
|
|
"children": []
|
|
},
|
|
{
|
|
"name": "paymentProviderService_",
|
|
"type": "[`PaymentProviderService`](PaymentProviderService.mdx)",
|
|
"description": "",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"expandable": false,
|
|
"children": []
|
|
},
|
|
{
|
|
"name": "productVariantInventoryService_",
|
|
"type": "[`ProductVariantInventoryService`](ProductVariantInventoryService.mdx)",
|
|
"description": "",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"expandable": false,
|
|
"children": []
|
|
},
|
|
{
|
|
"name": "regionService_",
|
|
"type": "[`RegionService`](RegionService.mdx)",
|
|
"description": "",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"expandable": false,
|
|
"children": []
|
|
},
|
|
{
|
|
"name": "returnService_",
|
|
"type": "[`ReturnService`](ReturnService.mdx)",
|
|
"description": "",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"expandable": false,
|
|
"children": []
|
|
},
|
|
{
|
|
"name": "shippingMethodRepository_",
|
|
"type": "`Repository`<[`ShippingMethod`](ShippingMethod.mdx)\\>",
|
|
"description": "",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"expandable": false,
|
|
"children": []
|
|
},
|
|
{
|
|
"name": "shippingOptionService_",
|
|
"type": "[`ShippingOptionService`](ShippingOptionService.mdx)",
|
|
"description": "",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"expandable": false,
|
|
"children": []
|
|
},
|
|
{
|
|
"name": "taxProviderService_",
|
|
"type": "[`TaxProviderService`](TaxProviderService.mdx)",
|
|
"description": "",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"expandable": false,
|
|
"children": []
|
|
},
|
|
{
|
|
"name": "totalsService_",
|
|
"type": "[`TotalsService`](TotalsService.mdx)",
|
|
"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.canceled\"",
|
|
"expandable": false,
|
|
"children": []
|
|
},
|
|
{
|
|
"name": "Events.CREATED",
|
|
"type": "`string`",
|
|
"description": "",
|
|
"optional": false,
|
|
"defaultValue": "\"claim.created\"",
|
|
"expandable": false,
|
|
"children": []
|
|
},
|
|
{
|
|
"name": "Events.FULFILLMENT_CREATED",
|
|
"type": "`string`",
|
|
"description": "",
|
|
"optional": false,
|
|
"defaultValue": "\"claim.fulfillment_created\"",
|
|
"expandable": false,
|
|
"children": []
|
|
},
|
|
{
|
|
"name": "Events.REFUND_PROCESSED",
|
|
"type": "`string`",
|
|
"description": "",
|
|
"optional": false,
|
|
"defaultValue": "\"claim.refund_processed\"",
|
|
"expandable": false,
|
|
"children": []
|
|
},
|
|
{
|
|
"name": "Events.SHIPMENT_CREATED",
|
|
"type": "`string`",
|
|
"description": "",
|
|
"optional": false,
|
|
"defaultValue": "\"claim.shipment_created\"",
|
|
"expandable": false,
|
|
"children": []
|
|
},
|
|
{
|
|
"name": "Events.UPDATED",
|
|
"type": "`string`",
|
|
"description": "",
|
|
"optional": false,
|
|
"defaultValue": "\"claim.updated\"",
|
|
"expandable": false,
|
|
"children": []
|
|
}
|
|
]} />
|
|
|
|
## Accessors
|
|
|
|
### activeManager\_
|
|
|
|
`Protected` `get` **activeManager_**(): `EntityManager`
|
|
|
|
#### Returns
|
|
|
|
`EntityManager`
|
|
|
|
<ParameterTypes parameters={[
|
|
{
|
|
"name": "EntityManager",
|
|
"type": "`EntityManager`",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"description": "",
|
|
"expandable": false,
|
|
"children": []
|
|
}
|
|
]} />
|
|
|
|
## Methods
|
|
|
|
### atomicPhase\_
|
|
|
|
`Protected` **atomicPhase_**<`TResult`, `TError`\>(`work`, `isolationOrErrorHandler?`, `maybeErrorHandlerOrDontFail?`): `Promise`<`TResult`\>
|
|
|
|
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.
|
|
|
|
<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`<`TResult`\\>",
|
|
"description": "the transactional work to be done",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"expandable": false,
|
|
"children": []
|
|
},
|
|
{
|
|
"name": "isolationOrErrorHandler",
|
|
"type": "`IsolationLevel` \\| (`error`: `TError`) => `Promise`<`void` \\| `TResult`\\>",
|
|
"description": "the isolation level to be used for the work.",
|
|
"optional": true,
|
|
"defaultValue": "",
|
|
"expandable": false,
|
|
"children": []
|
|
},
|
|
{
|
|
"name": "maybeErrorHandlerOrDontFail",
|
|
"type": "(`error`: `TError`) => `Promise`<`void` \\| `TResult`\\>",
|
|
"description": "Potential error handler",
|
|
"optional": true,
|
|
"defaultValue": "",
|
|
"expandable": false,
|
|
"children": []
|
|
}
|
|
]} />
|
|
|
|
#### Returns
|
|
|
|
`Promise`<`TResult`\>
|
|
|
|
<ParameterTypes parameters={[
|
|
{
|
|
"name": "Promise",
|
|
"type": "`Promise`<`TResult`\\>",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"description": "the result of the transactional work",
|
|
"expandable": false,
|
|
"children": []
|
|
}
|
|
]} />
|
|
|
|
___
|
|
|
|
### cancel
|
|
|
|
**cancel**(`id`): `Promise`<[`ClaimOrder`](ClaimOrder.mdx)\>
|
|
|
|
#### Parameters
|
|
|
|
<ParameterTypes parameters={[
|
|
{
|
|
"name": "id",
|
|
"type": "`string`",
|
|
"description": "",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"expandable": false,
|
|
"children": []
|
|
}
|
|
]} />
|
|
|
|
#### Returns
|
|
|
|
`Promise`<[`ClaimOrder`](ClaimOrder.mdx)\>
|
|
|
|
<ParameterTypes parameters={[
|
|
{
|
|
"name": "Promise",
|
|
"type": "`Promise`<[`ClaimOrder`](ClaimOrder.mdx)\\>",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"description": "",
|
|
"expandable": false,
|
|
"children": []
|
|
}
|
|
]} />
|
|
|
|
___
|
|
|
|
### cancelFulfillment
|
|
|
|
**cancelFulfillment**(`fulfillmentId`): `Promise`<[`ClaimOrder`](ClaimOrder.mdx)\>
|
|
|
|
#### Parameters
|
|
|
|
<ParameterTypes parameters={[
|
|
{
|
|
"name": "fulfillmentId",
|
|
"type": "`string`",
|
|
"description": "",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"expandable": false,
|
|
"children": []
|
|
}
|
|
]} />
|
|
|
|
#### Returns
|
|
|
|
`Promise`<[`ClaimOrder`](ClaimOrder.mdx)\>
|
|
|
|
<ParameterTypes parameters={[
|
|
{
|
|
"name": "Promise",
|
|
"type": "`Promise`<[`ClaimOrder`](ClaimOrder.mdx)\\>",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"description": "",
|
|
"expandable": false,
|
|
"children": []
|
|
}
|
|
]} />
|
|
|
|
___
|
|
|
|
### create
|
|
|
|
**create**(`data`): `Promise`<[`ClaimOrder`](ClaimOrder.mdx)\>
|
|
|
|
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
|
|
|
|
<ParameterTypes parameters={[
|
|
{
|
|
"name": "data",
|
|
"type": "[`CreateClaimInput`](../types/CreateClaimInput.mdx)",
|
|
"description": "the object containing all data required to create a claim",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"expandable": false,
|
|
"children": []
|
|
}
|
|
]} />
|
|
|
|
#### Returns
|
|
|
|
`Promise`<[`ClaimOrder`](ClaimOrder.mdx)\>
|
|
|
|
<ParameterTypes parameters={[
|
|
{
|
|
"name": "Promise",
|
|
"type": "`Promise`<[`ClaimOrder`](ClaimOrder.mdx)\\>",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"description": "created claim",
|
|
"expandable": false,
|
|
"children": []
|
|
}
|
|
]} />
|
|
|
|
___
|
|
|
|
### createFulfillment
|
|
|
|
**createFulfillment**(`id`, `config?`): `Promise`<[`ClaimOrder`](ClaimOrder.mdx)\>
|
|
|
|
#### Parameters
|
|
|
|
<ParameterTypes parameters={[
|
|
{
|
|
"name": "id",
|
|
"type": "`string`",
|
|
"description": "the object containing all data required to create a claim",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"expandable": false,
|
|
"children": []
|
|
},
|
|
{
|
|
"name": "config",
|
|
"type": "`object`",
|
|
"description": "config object",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"expandable": false,
|
|
"children": []
|
|
},
|
|
{
|
|
"name": "config.location_id",
|
|
"type": "`string`",
|
|
"description": "",
|
|
"optional": true,
|
|
"defaultValue": "",
|
|
"expandable": false,
|
|
"children": []
|
|
},
|
|
{
|
|
"name": "config.metadata",
|
|
"type": "Record<`string`, `unknown`\\>",
|
|
"description": "config metadata",
|
|
"optional": true,
|
|
"defaultValue": "",
|
|
"expandable": false,
|
|
"children": []
|
|
},
|
|
{
|
|
"name": "config.no_notification",
|
|
"type": "`boolean`",
|
|
"description": "config no notification",
|
|
"optional": true,
|
|
"defaultValue": "",
|
|
"expandable": false,
|
|
"children": []
|
|
}
|
|
]} />
|
|
|
|
#### Returns
|
|
|
|
`Promise`<[`ClaimOrder`](ClaimOrder.mdx)\>
|
|
|
|
<ParameterTypes parameters={[
|
|
{
|
|
"name": "Promise",
|
|
"type": "`Promise`<[`ClaimOrder`](ClaimOrder.mdx)\\>",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"description": "created claim",
|
|
"expandable": false,
|
|
"children": []
|
|
}
|
|
]} />
|
|
|
|
___
|
|
|
|
### createShipment
|
|
|
|
**createShipment**(`id`, `fulfillmentId`, `trackingLinks?`, `config?`): `Promise`<[`ClaimOrder`](ClaimOrder.mdx)\>
|
|
|
|
#### Parameters
|
|
|
|
<ParameterTypes parameters={[
|
|
{
|
|
"name": "id",
|
|
"type": "`string`",
|
|
"description": "",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"expandable": false,
|
|
"children": []
|
|
},
|
|
{
|
|
"name": "fulfillmentId",
|
|
"type": "`string`",
|
|
"description": "",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"expandable": false,
|
|
"children": []
|
|
},
|
|
{
|
|
"name": "trackingLinks",
|
|
"type": "{ `tracking_number`: `string` }[]",
|
|
"description": "",
|
|
"optional": false,
|
|
"defaultValue": "[]",
|
|
"expandable": false,
|
|
"children": []
|
|
},
|
|
{
|
|
"name": "config",
|
|
"type": "`object`",
|
|
"description": "",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"expandable": false,
|
|
"children": []
|
|
},
|
|
{
|
|
"name": "config.metadata",
|
|
"type": "`object`",
|
|
"description": "",
|
|
"optional": false,
|
|
"defaultValue": "{}",
|
|
"expandable": false,
|
|
"children": []
|
|
},
|
|
{
|
|
"name": "config.no_notification",
|
|
"type": "`undefined`",
|
|
"description": "",
|
|
"optional": false,
|
|
"defaultValue": "undefined",
|
|
"expandable": false,
|
|
"children": []
|
|
}
|
|
]} />
|
|
|
|
#### Returns
|
|
|
|
`Promise`<[`ClaimOrder`](ClaimOrder.mdx)\>
|
|
|
|
<ParameterTypes parameters={[
|
|
{
|
|
"name": "Promise",
|
|
"type": "`Promise`<[`ClaimOrder`](ClaimOrder.mdx)\\>",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"description": "",
|
|
"expandable": false,
|
|
"children": []
|
|
}
|
|
]} />
|
|
|
|
___
|
|
|
|
### getRefundTotalForClaimLinesOnOrder
|
|
|
|
`Protected` **getRefundTotalForClaimLinesOnOrder**(`order`, `claimItems`): `Promise`<`number`\>
|
|
|
|
Finds claim line items on an order and calculates the refund amount.
|
|
There are three places too look:
|
|
- Order items
|
|
- Swap items
|
|
- Claim items (from previous claims)
|
|
Note, it will attempt to return early from each of these places to avoid having to iterate over all items every time.
|
|
|
|
#### Parameters
|
|
|
|
<ParameterTypes parameters={[
|
|
{
|
|
"name": "order",
|
|
"type": "[`Order`](Order.mdx)",
|
|
"description": "the order to find claim lines on",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"expandable": false,
|
|
"children": []
|
|
},
|
|
{
|
|
"name": "claimItems",
|
|
"type": "[`CreateClaimItemInput`](../types/CreateClaimItemInput.mdx)[]",
|
|
"description": "the claim items to match against",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"expandable": false,
|
|
"children": []
|
|
}
|
|
]} />
|
|
|
|
#### Returns
|
|
|
|
`Promise`<`number`\>
|
|
|
|
<ParameterTypes parameters={[
|
|
{
|
|
"name": "Promise",
|
|
"type": "`Promise`<`number`\\>",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"description": "the refund amount",
|
|
"expandable": false,
|
|
"children": []
|
|
}
|
|
]} />
|
|
|
|
___
|
|
|
|
### list
|
|
|
|
**list**(`selector`, `config?`): `Promise`<[`ClaimOrder`](ClaimOrder.mdx)[]\>
|
|
|
|
#### Parameters
|
|
|
|
<ParameterTypes parameters={[
|
|
{
|
|
"name": "selector",
|
|
"type": "`any`",
|
|
"description": "the query object for find",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"expandable": false,
|
|
"children": []
|
|
},
|
|
{
|
|
"name": "config",
|
|
"type": "[`FindConfig`](../interfaces/FindConfig.mdx)<[`ClaimOrder`](ClaimOrder.mdx)\\>",
|
|
"description": "the config object containing query settings",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"expandable": false,
|
|
"children": []
|
|
}
|
|
]} />
|
|
|
|
#### Returns
|
|
|
|
`Promise`<[`ClaimOrder`](ClaimOrder.mdx)[]\>
|
|
|
|
<ParameterTypes parameters={[
|
|
{
|
|
"name": "Promise",
|
|
"type": "`Promise`<[`ClaimOrder`](ClaimOrder.mdx)[]\\>",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"description": "the result of the find operation",
|
|
"expandable": false,
|
|
"children": []
|
|
}
|
|
]} />
|
|
|
|
___
|
|
|
|
### processRefund
|
|
|
|
**processRefund**(`id`): `Promise`<[`ClaimOrder`](ClaimOrder.mdx)\>
|
|
|
|
#### Parameters
|
|
|
|
<ParameterTypes parameters={[
|
|
{
|
|
"name": "id",
|
|
"type": "`string`",
|
|
"description": "",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"expandable": false,
|
|
"children": []
|
|
}
|
|
]} />
|
|
|
|
#### Returns
|
|
|
|
`Promise`<[`ClaimOrder`](ClaimOrder.mdx)\>
|
|
|
|
<ParameterTypes parameters={[
|
|
{
|
|
"name": "Promise",
|
|
"type": "`Promise`<[`ClaimOrder`](ClaimOrder.mdx)\\>",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"description": "",
|
|
"expandable": false,
|
|
"children": []
|
|
}
|
|
]} />
|
|
|
|
___
|
|
|
|
### retrieve
|
|
|
|
**retrieve**(`claimId`, `config?`): `Promise`<[`ClaimOrder`](ClaimOrder.mdx)\>
|
|
|
|
Gets an order by id.
|
|
|
|
#### Parameters
|
|
|
|
<ParameterTypes parameters={[
|
|
{
|
|
"name": "claimId",
|
|
"type": "`string`",
|
|
"description": "id of the claim order to retrieve",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"expandable": false,
|
|
"children": []
|
|
},
|
|
{
|
|
"name": "config",
|
|
"type": "[`FindConfig`](../interfaces/FindConfig.mdx)<[`ClaimOrder`](ClaimOrder.mdx)\\>",
|
|
"description": "the config object containing query settings",
|
|
"optional": false,
|
|
"defaultValue": "{}",
|
|
"expandable": false,
|
|
"children": []
|
|
}
|
|
]} />
|
|
|
|
#### Returns
|
|
|
|
`Promise`<[`ClaimOrder`](ClaimOrder.mdx)\>
|
|
|
|
<ParameterTypes parameters={[
|
|
{
|
|
"name": "Promise",
|
|
"type": "`Promise`<[`ClaimOrder`](ClaimOrder.mdx)\\>",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"description": "the order document",
|
|
"expandable": false,
|
|
"children": []
|
|
}
|
|
]} />
|
|
|
|
___
|
|
|
|
### shouldRetryTransaction\_
|
|
|
|
`Protected` **shouldRetryTransaction_**(`err`): `boolean`
|
|
|
|
#### Parameters
|
|
|
|
<ParameterTypes parameters={[
|
|
{
|
|
"name": "err",
|
|
"type": "Record<`string`, `unknown`\\> \\| { `code`: `string` }",
|
|
"description": "",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"expandable": false,
|
|
"children": []
|
|
}
|
|
]} />
|
|
|
|
#### Returns
|
|
|
|
`boolean`
|
|
|
|
<ParameterTypes parameters={[
|
|
{
|
|
"name": "boolean",
|
|
"type": "`boolean`",
|
|
"optional": true,
|
|
"defaultValue": "",
|
|
"description": "",
|
|
"expandable": false,
|
|
"children": []
|
|
}
|
|
]} />
|
|
|
|
___
|
|
|
|
### update
|
|
|
|
**update**(`id`, `data`): `Promise`<[`ClaimOrder`](ClaimOrder.mdx)\>
|
|
|
|
#### Parameters
|
|
|
|
<ParameterTypes parameters={[
|
|
{
|
|
"name": "id",
|
|
"type": "`string`",
|
|
"description": "",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"expandable": false,
|
|
"children": []
|
|
},
|
|
{
|
|
"name": "data",
|
|
"type": "[`UpdateClaimInput`](../types/UpdateClaimInput.mdx)",
|
|
"description": "",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"expandable": false,
|
|
"children": []
|
|
}
|
|
]} />
|
|
|
|
#### Returns
|
|
|
|
`Promise`<[`ClaimOrder`](ClaimOrder.mdx)\>
|
|
|
|
<ParameterTypes parameters={[
|
|
{
|
|
"name": "Promise",
|
|
"type": "`Promise`<[`ClaimOrder`](ClaimOrder.mdx)\\>",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"description": "",
|
|
"expandable": false,
|
|
"children": []
|
|
}
|
|
]} />
|
|
|
|
___
|
|
|
|
### validateCreateClaimInput
|
|
|
|
`Protected` **validateCreateClaimInput**(`data`): `Promise`<`void`\>
|
|
|
|
#### Parameters
|
|
|
|
<ParameterTypes parameters={[
|
|
{
|
|
"name": "data",
|
|
"type": "[`CreateClaimInput`](../types/CreateClaimInput.mdx)",
|
|
"description": "",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"expandable": false,
|
|
"children": []
|
|
}
|
|
]} />
|
|
|
|
#### Returns
|
|
|
|
`Promise`<`void`\>
|
|
|
|
<ParameterTypes parameters={[
|
|
{
|
|
"name": "Promise",
|
|
"type": "`Promise`<`void`\\>",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"description": "",
|
|
"expandable": false,
|
|
"children": []
|
|
}
|
|
]} />
|
|
|
|
___
|
|
|
|
### withTransaction
|
|
|
|
**withTransaction**(`transactionManager?`): [`ClaimService`](ClaimService.mdx)
|
|
|
|
#### Parameters
|
|
|
|
<ParameterTypes parameters={[
|
|
{
|
|
"name": "transactionManager",
|
|
"type": "`EntityManager`",
|
|
"description": "",
|
|
"optional": true,
|
|
"defaultValue": "",
|
|
"expandable": false,
|
|
"children": []
|
|
}
|
|
]} />
|
|
|
|
#### Returns
|
|
|
|
[`ClaimService`](ClaimService.mdx)
|
|
|
|
<ParameterTypes parameters={[
|
|
{
|
|
"name": "default",
|
|
"type": "[`ClaimService`](ClaimService.mdx)",
|
|
"optional": false,
|
|
"defaultValue": "",
|
|
"description": "",
|
|
"expandable": false,
|
|
"children": []
|
|
}
|
|
]} />
|