chore(docs): Generated References (#5743)

Generated the following references:
- `entities`
- `inventory`
- `js-client`
- `pricing`
- `product`
- `services`
- `stock-location`
- `workflows`

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
This commit is contained in:
authored and GitHub committed 2023-11-27 18:58:52 +00:00
1 parent dc6b815b12
commit cdd42dbdcd
1383 files changed
+18978 -20154

No files matched your search

@@ -12,11 +12,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Constructors
### constructor
#### constructor
`Protected **new AbstractBatchJobStrategy**(__container__, __configModule__?, __moduleDeclaration__?)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -127,29 +127,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Accessors
### activeManager\_
#### activeManager\_
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
`Protected` **activeManager\_**: [object Object]
## Methods
### atomicPhase\_
#### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -157,6 +141,8 @@ 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",
@@ -178,7 +164,7 @@ transaction manager is created.
}
]} />
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -210,7 +196,7 @@ transaction manager is created.
}
]} />
#### Returns
##### Returns
Promise&#60;TResult&#62;
@@ -228,13 +214,13 @@ Promise&#60;TResult&#62;
___
### buildTemplate
#### buildTemplate
`Abstract **buildTemplate**(): Promise&#60;string&#62;`
Builds and returns a template file that can be downloaded and filled in
#### Returns
##### Returns
Promise&#60;string&#62;
@@ -252,10 +238,12 @@ Promise&#60;string&#62;
___
### handleProcessingError
#### handleProcessingError
`Protected **handleProcessingError**<TypeParameter T>(batchJobId, err, result): Promise&#60;void&#62;`
##### Type Parameters
<ParameterTypes parameters={[
{
"name": "T",
@@ -268,7 +256,7 @@ ___
}
]} />
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -300,7 +288,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;void&#62;
@@ -318,13 +306,13 @@ Promise&#60;void&#62;
___
### preProcessBatchJob
#### preProcessBatchJob
`**preProcessBatchJob**(batchJobId): Promise&#60;void&#62;`
Method for pre-processing a batch job
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -338,7 +326,7 @@ Method for pre-processing a batch job
}
]} />
#### Returns
##### Returns
Promise&#60;void&#62;
@@ -356,13 +344,13 @@ Promise&#60;void&#62;
___
### prepareBatchJobForProcessing
#### prepareBatchJobForProcessing
`**prepareBatchJobForProcessing**(batchJob, req): Promise&#60;[CreateBatchJobInput](../types/CreateBatchJobInput.mdx)&#62;`
Method for preparing a batch job for processing
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -385,7 +373,7 @@ Method for preparing a batch job for processing
}
]} />
#### Returns
##### Returns
Promise&#60;[CreateBatchJobInput](../types/CreateBatchJobInput.mdx)&#62;
@@ -403,13 +391,13 @@ Promise&#60;[CreateBatchJobInput](../types/CreateBatchJobInput.mdx)&#62;
___
### processJob
#### processJob
`Abstract **processJob**(batchJobId): Promise&#60;void&#62;`
Method does the actual processing of the job. Should report back on the progress of the operation.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -423,7 +411,7 @@ Method does the actual processing of the job. Should report back on the progress
}
]} />
#### Returns
##### Returns
Promise&#60;void&#62;
@@ -441,11 +429,11 @@ Promise&#60;void&#62;
___
### shouldRetryOnProcessingError
#### shouldRetryOnProcessingError
`Protected **shouldRetryOnProcessingError**(batchJob, err): Promise&#60;boolean&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -468,7 +456,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;boolean&#62;
@@ -486,11 +474,11 @@ Promise&#60;boolean&#62;
___
### shouldRetryTransaction\_
#### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -504,7 +492,7 @@ ___
}
]} />
#### Returns
##### Returns
`boolean`
@@ -522,11 +510,11 @@ ___
___
### withTransaction
#### withTransaction
`**withTransaction**(transactionManager?): [AbstractBatchJobStrategy](AbstractBatchJobStrategy.mdx)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -540,7 +528,7 @@ ___
}
]} />
#### Returns
##### Returns
[AbstractBatchJobStrategy](AbstractBatchJobStrategy.mdx)
@@ -12,7 +12,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Constructors
### constructor
#### constructor
`**new AbstractEventBusModuleService**()`
@@ -32,32 +32,18 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Accessors
### eventToSubscribersMap
#### eventToSubscribersMap
`get**eventToSubscribersMap**(): Map&#60;string \| symbol, [SubscriberDescriptor](../types/SubscriberDescriptor.mdx)[]&#62;`
#### Returns
Map&#60;string \| symbol, [SubscriberDescriptor](../types/SubscriberDescriptor.mdx)[]&#62;
<ParameterTypes parameters={[
{
"name": "Map",
"type": "Map&#60;string \\| symbol, [SubscriberDescriptor](../types/SubscriberDescriptor.mdx)[]&#62;",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
**eventToSubscribersMap**: [object Object]
## Methods
### emit
#### emit
`Abstract **emit**<TypeParameter T>(eventName, data, options): Promise&#60;void&#62;`
##### Type Parameters
<ParameterTypes parameters={[
{
"name": "T",
@@ -70,7 +56,7 @@ Map&#60;string \| symbol, [SubscriberDescriptor](../types/SubscriberDescriptor.m
}
]} />
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -102,7 +88,7 @@ Map&#60;string \| symbol, [SubscriberDescriptor](../types/SubscriberDescriptor.m
}
]} />
#### Returns
##### Returns
Promise&#60;void&#62;
@@ -120,6 +106,8 @@ Promise&#60;void&#62;
`Abstract **emit**<TypeParameter T>(data): Promise&#60;void&#62;`
##### Type Parameters
<ParameterTypes parameters={[
{
"name": "T",
@@ -132,7 +120,7 @@ Promise&#60;void&#62;
}
]} />
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -146,7 +134,7 @@ Promise&#60;void&#62;
}
]} />
#### Returns
##### Returns
Promise&#60;void&#62;
@@ -164,11 +152,11 @@ Promise&#60;void&#62;
___
### storeSubscribers
#### storeSubscribers
`Protected **storeSubscribers**(«destructured»): void`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -209,7 +197,7 @@ ___
}
]} />
#### Returns
##### Returns
`void`
@@ -227,11 +215,11 @@ ___
___
### subscribe
#### subscribe
`**subscribe**(eventName, subscriber, context?): [AbstractEventBusModuleService](AbstractEventBusModuleService.mdx)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -263,7 +251,7 @@ ___
}
]} />
#### Returns
##### Returns
[AbstractEventBusModuleService](AbstractEventBusModuleService.mdx)
@@ -281,11 +269,11 @@ ___
___
### unsubscribe
#### unsubscribe
`**unsubscribe**(eventName, subscriber, context): [AbstractEventBusModuleService](AbstractEventBusModuleService.mdx)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -317,7 +305,7 @@ ___
}
]} />
#### Returns
##### Returns
[AbstractEventBusModuleService](AbstractEventBusModuleService.mdx)
@@ -12,11 +12,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Constructors
### constructor
#### constructor
`Protected **new AbstractNotificationService**(__container__, __configModule__?, __moduleDeclaration__?)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -109,29 +109,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Accessors
### activeManager\_
#### activeManager\_
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
`Protected` **activeManager\_**: [object Object]
## Methods
### atomicPhase\_
#### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -139,6 +123,8 @@ 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",
@@ -160,7 +146,7 @@ transaction manager is created.
}
]} />
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -192,7 +178,7 @@ transaction manager is created.
}
]} />
#### Returns
##### Returns
Promise&#60;TResult&#62;
@@ -210,11 +196,11 @@ Promise&#60;TResult&#62;
___
### getIdentifier
#### getIdentifier
`**getIdentifier**(): string`
#### Returns
##### Returns
`string`
@@ -232,11 +218,11 @@ ___
___
### resendNotification
#### resendNotification
`Abstract **resendNotification**(notification, config, attachmentGenerator): Promise&#60;[ReturnedData](../types/ReturnedData.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -268,7 +254,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[ReturnedData](../types/ReturnedData.mdx)&#62;
@@ -286,11 +272,11 @@ Promise&#60;[ReturnedData](../types/ReturnedData.mdx)&#62;
___
### sendNotification
#### sendNotification
`Abstract **sendNotification**(event, data, attachmentGenerator): Promise&#60;[ReturnedData](../types/ReturnedData.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -322,7 +308,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[ReturnedData](../types/ReturnedData.mdx)&#62;
@@ -340,11 +326,11 @@ Promise&#60;[ReturnedData](../types/ReturnedData.mdx)&#62;
___
### shouldRetryTransaction\_
#### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -358,7 +344,7 @@ ___
}
]} />
#### Returns
##### Returns
`boolean`
@@ -376,11 +362,11 @@ ___
___
### withTransaction
#### withTransaction
`**withTransaction**(transactionManager?): [AbstractNotificationService](AbstractNotificationService.mdx)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -394,7 +380,7 @@ ___
}
]} />
#### Returns
##### Returns
[AbstractNotificationService](AbstractNotificationService.mdx)
@@ -14,11 +14,11 @@ Payment processor in charge of creating , managing and processing a payment
## Constructors
### constructor
#### constructor
`Protected **new AbstractPaymentProcessor**(container, config?)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -75,13 +75,13 @@ Payment processor in charge of creating , managing and processing a payment
## Methods
### authorizePayment
#### authorizePayment
`Abstract **authorizePayment**(paymentSessionData, context): Promise&#60;[PaymentProcessorError](../interfaces/PaymentProcessorError.mdx) \| &#123; data: Record&#60;string, unknown&#62; ; status: [PaymentSessionStatus](../enums/PaymentSessionStatus.mdx) &#125;&#62;`
Authorize an existing session if it is not already authorized
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -104,7 +104,7 @@ Authorize an existing session if it is not already authorized
}
]} />
#### Returns
##### Returns
Promise&#60;[PaymentProcessorError](../interfaces/PaymentProcessorError.mdx) \| &#123; data: Record&#60;string, unknown&#62; ; status: [PaymentSessionStatus](../enums/PaymentSessionStatus.mdx) &#125;&#62;
@@ -122,13 +122,13 @@ Promise&#60;[PaymentProcessorError](../interfaces/PaymentProcessorError.mdx) \|
___
### cancelPayment
#### cancelPayment
`Abstract **cancelPayment**(paymentSessionData): Promise&#60;Record&#60;string, unknown&#62; \| [PaymentProcessorError](../interfaces/PaymentProcessorError.mdx)&#62;`
Cancel an existing session
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -142,7 +142,7 @@ Cancel an existing session
}
]} />
#### Returns
##### Returns
Promise&#60;Record&#60;string, unknown&#62; \| [PaymentProcessorError](../interfaces/PaymentProcessorError.mdx)&#62;
@@ -160,13 +160,13 @@ Promise&#60;Record&#60;string, unknown&#62; \| [PaymentProcessorError](../interf
___
### capturePayment
#### capturePayment
`Abstract **capturePayment**(paymentSessionData): Promise&#60;Record&#60;string, unknown&#62; \| [PaymentProcessorError](../interfaces/PaymentProcessorError.mdx)&#62;`
Capture an existing session
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -180,7 +180,7 @@ Capture an existing session
}
]} />
#### Returns
##### Returns
Promise&#60;Record&#60;string, unknown&#62; \| [PaymentProcessorError](../interfaces/PaymentProcessorError.mdx)&#62;
@@ -198,13 +198,13 @@ Promise&#60;Record&#60;string, unknown&#62; \| [PaymentProcessorError](../interf
___
### deletePayment
#### deletePayment
`Abstract **deletePayment**(paymentSessionData): Promise&#60;Record&#60;string, unknown&#62; \| [PaymentProcessorError](../interfaces/PaymentProcessorError.mdx)&#62;`
Delete an existing session
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -218,7 +218,7 @@ Delete an existing session
}
]} />
#### Returns
##### Returns
Promise&#60;Record&#60;string, unknown&#62; \| [PaymentProcessorError](../interfaces/PaymentProcessorError.mdx)&#62;
@@ -236,13 +236,13 @@ Promise&#60;Record&#60;string, unknown&#62; \| [PaymentProcessorError](../interf
___
### getIdentifier
#### getIdentifier
`**getIdentifier**(): string`
Return a unique identifier to retrieve the payment plugin provider
#### Returns
##### Returns
`string`
@@ -260,13 +260,13 @@ Return a unique identifier to retrieve the payment plugin provider
___
### getPaymentStatus
#### getPaymentStatus
`Abstract **getPaymentStatus**(paymentSessionData): Promise&#60;[PaymentSessionStatus](../enums/PaymentSessionStatus.mdx)&#62;`
Return the status of the session
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -280,7 +280,7 @@ Return the status of the session
}
]} />
#### Returns
##### Returns
Promise&#60;[PaymentSessionStatus](../enums/PaymentSessionStatus.mdx)&#62;
@@ -298,13 +298,13 @@ Promise&#60;[PaymentSessionStatus](../enums/PaymentSessionStatus.mdx)&#62;
___
### initiatePayment
#### initiatePayment
`Abstract **initiatePayment**(context): Promise&#60;[PaymentProcessorError](../interfaces/PaymentProcessorError.mdx) \| [PaymentProcessorSessionResponse](../types/PaymentProcessorSessionResponse.mdx)&#62;`
Initiate a payment session with the external provider
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -318,7 +318,7 @@ Initiate a payment session with the external provider
}
]} />
#### Returns
##### Returns
Promise&#60;[PaymentProcessorError](../interfaces/PaymentProcessorError.mdx) \| [PaymentProcessorSessionResponse](../types/PaymentProcessorSessionResponse.mdx)&#62;
@@ -336,13 +336,13 @@ Promise&#60;[PaymentProcessorError](../interfaces/PaymentProcessorError.mdx) \|
___
### refundPayment
#### refundPayment
`Abstract **refundPayment**(paymentSessionData, refundAmount): Promise&#60;Record&#60;string, unknown&#62; \| [PaymentProcessorError](../interfaces/PaymentProcessorError.mdx)&#62;`
Refund an existing session
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -365,7 +365,7 @@ Refund an existing session
}
]} />
#### Returns
##### Returns
Promise&#60;Record&#60;string, unknown&#62; \| [PaymentProcessorError](../interfaces/PaymentProcessorError.mdx)&#62;
@@ -383,13 +383,13 @@ Promise&#60;Record&#60;string, unknown&#62; \| [PaymentProcessorError](../interf
___
### retrievePayment
#### retrievePayment
`Abstract **retrievePayment**(paymentSessionData): Promise&#60;Record&#60;string, unknown&#62; \| [PaymentProcessorError](../interfaces/PaymentProcessorError.mdx)&#62;`
Retrieve an existing session
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -403,7 +403,7 @@ Retrieve an existing session
}
]} />
#### Returns
##### Returns
Promise&#60;Record&#60;string, unknown&#62; \| [PaymentProcessorError](../interfaces/PaymentProcessorError.mdx)&#62;
@@ -421,13 +421,13 @@ Promise&#60;Record&#60;string, unknown&#62; \| [PaymentProcessorError](../interf
___
### updatePayment
#### updatePayment
`Abstract **updatePayment**(context): Promise&#60;void \| [PaymentProcessorError](../interfaces/PaymentProcessorError.mdx) \| [PaymentProcessorSessionResponse](../types/PaymentProcessorSessionResponse.mdx)&#62;`
Update an existing payment session
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -441,7 +441,7 @@ Update an existing payment session
}
]} />
#### Returns
##### Returns
Promise&#60;void \| [PaymentProcessorError](../interfaces/PaymentProcessorError.mdx) \| [PaymentProcessorSessionResponse](../types/PaymentProcessorSessionResponse.mdx)&#62;
@@ -459,13 +459,13 @@ Promise&#60;void \| [PaymentProcessorError](../interfaces/PaymentProcessorError.
___
### updatePaymentData
#### updatePaymentData
`Abstract **updatePaymentData**(sessionId, data): Promise&#60;Record&#60;string, unknown&#62; \| [PaymentProcessorError](../interfaces/PaymentProcessorError.mdx)&#62;`
Update the session data for a payment session
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -488,7 +488,7 @@ Update the session data for a payment session
}
]} />
#### Returns
##### Returns
Promise&#60;Record&#60;string, unknown&#62; \| [PaymentProcessorError](../interfaces/PaymentProcessorError.mdx)&#62;
@@ -18,11 +18,11 @@ in the near future use the AbstractPaymentProcessor instead
## Constructors
### constructor
#### constructor
`Protected **new AbstractPaymentService**(container, config?)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -106,29 +106,13 @@ in the near future use the AbstractPaymentProcessor instead
## Accessors
### activeManager\_
#### activeManager\_
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
`Protected` **activeManager\_**: [object Object]
## Methods
### atomicPhase\_
#### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -136,6 +120,8 @@ 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",
@@ -157,7 +143,7 @@ transaction manager is created.
}
]} />
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -189,7 +175,7 @@ transaction manager is created.
}
]} />
#### Returns
##### Returns
Promise&#60;TResult&#62;
@@ -207,11 +193,11 @@ Promise&#60;TResult&#62;
___
### authorizePayment
#### authorizePayment
`Abstract **authorizePayment**(paymentSession, context): Promise&#60;&#123; data: [Data](../types/Data.mdx) ; status: [PaymentSessionStatus](../enums/PaymentSessionStatus.mdx) &#125;&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -234,7 +220,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;&#123; data: [Data](../types/Data.mdx) ; status: [PaymentSessionStatus](../enums/PaymentSessionStatus.mdx) &#125;&#62;
@@ -254,13 +240,13 @@ Promise&#60;&#123; data: [Data](../types/Data.mdx) ; status: [PaymentSessionStat
___
### cancelPayment
#### cancelPayment
`Abstract **cancelPayment**(payment): Promise&#60;[Data](../types/Data.mdx)&#62;`
This will be
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -274,7 +260,7 @@ This will be
}
]} />
#### Returns
##### Returns
Promise&#60;[Data](../types/Data.mdx)&#62;
@@ -296,13 +282,13 @@ in the near future
___
### capturePayment
#### capturePayment
`Abstract **capturePayment**(payment): Promise&#60;[Data](../types/Data.mdx)&#62;`
This will be
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -316,7 +302,7 @@ This will be
}
]} />
#### Returns
##### Returns
Promise&#60;[Data](../types/Data.mdx)&#62;
@@ -338,11 +324,11 @@ in the near future
___
### createPayment
#### createPayment
`Abstract **createPayment**(context): Promise&#60;[PaymentSessionResponse](../types/PaymentSessionResponse.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -356,7 +342,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[PaymentSessionResponse](../types/PaymentSessionResponse.mdx)&#62;
@@ -376,7 +362,7 @@ Promise&#60;[PaymentSessionResponse](../types/PaymentSessionResponse.mdx)&#62;
This will be
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -390,7 +376,7 @@ This will be
}
]} />
#### Returns
##### Returns
Promise&#60;[Data](../types/Data.mdx)&#62;
@@ -412,13 +398,13 @@ in the near future use `createPayment(context: Cart & PaymentContext): Promise<P
___
### deletePayment
#### deletePayment
`Abstract **deletePayment**(paymentSession): Promise&#60;void&#62;`
This will be
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -432,7 +418,7 @@ This will be
}
]} />
#### Returns
##### Returns
Promise&#60;void&#62;
@@ -454,11 +440,11 @@ in the near future
___
### getIdentifier
#### getIdentifier
`**getIdentifier**(): string`
#### Returns
##### Returns
`string`
@@ -476,11 +462,11 @@ ___
___
### getPaymentData
#### getPaymentData
`Abstract **getPaymentData**(paymentSession): Promise&#60;[Data](../types/Data.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -494,7 +480,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[Data](../types/Data.mdx)&#62;
@@ -514,13 +500,13 @@ Promise&#60;[Data](../types/Data.mdx)&#62;
___
### getStatus
#### getStatus
`Abstract **getStatus**(data): Promise&#60;[PaymentSessionStatus](../enums/PaymentSessionStatus.mdx)&#62;`
This will be
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -534,7 +520,7 @@ This will be
}
]} />
#### Returns
##### Returns
Promise&#60;[PaymentSessionStatus](../enums/PaymentSessionStatus.mdx)&#62;
@@ -556,13 +542,13 @@ in the near future
___
### refundPayment
#### refundPayment
`Abstract **refundPayment**(payment, refundAmount): Promise&#60;[Data](../types/Data.mdx)&#62;`
This will be
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -585,7 +571,7 @@ This will be
}
]} />
#### Returns
##### Returns
Promise&#60;[Data](../types/Data.mdx)&#62;
@@ -607,11 +593,11 @@ in the near future
___
### retrievePayment
#### retrievePayment
`Abstract **retrievePayment**(paymentData): Promise&#60;[Data](../types/Data.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -625,7 +611,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[Data](../types/Data.mdx)&#62;
@@ -645,13 +631,13 @@ Promise&#60;[Data](../types/Data.mdx)&#62;
___
### retrieveSavedMethods
#### retrieveSavedMethods
`**retrieveSavedMethods**(customer): Promise&#60;[Data](../types/Data.mdx)[]&#62;`
This will be
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -665,7 +651,7 @@ This will be
}
]} />
#### Returns
##### Returns
Promise&#60;[Data](../types/Data.mdx)[]&#62;
@@ -687,11 +673,11 @@ in the near future
___
### shouldRetryTransaction\_
#### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -705,7 +691,7 @@ ___
}
]} />
#### Returns
##### Returns
`boolean`
@@ -723,11 +709,11 @@ ___
___
### updatePayment
#### updatePayment
`Abstract **updatePayment**(paymentSessionData, context): Promise&#60;Record&#60;string, unknown&#62; \| [PaymentSessionResponse](../types/PaymentSessionResponse.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -750,7 +736,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;Record&#60;string, unknown&#62; \| [PaymentSessionResponse](../types/PaymentSessionResponse.mdx)&#62;
@@ -770,7 +756,7 @@ Promise&#60;Record&#60;string, unknown&#62; \| [PaymentSessionResponse](../types
This will be
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -793,7 +779,7 @@ This will be
}
]} />
#### Returns
##### Returns
Promise&#60;[Data](../types/Data.mdx)&#62;
@@ -815,11 +801,11 @@ in the near future use `updatePayment(paymentSessionData: PaymentSessionData, co
___
### updatePaymentData
#### updatePaymentData
`Abstract **updatePaymentData**(paymentSessionData, data): Promise&#60;[Data](../types/Data.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -842,7 +828,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[Data](../types/Data.mdx)&#62;
@@ -862,11 +848,11 @@ Promise&#60;[Data](../types/Data.mdx)&#62;
___
### withTransaction
#### withTransaction
`**withTransaction**(transactionManager?): [AbstractPaymentService](AbstractPaymentService.mdx)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -880,7 +866,7 @@ ___
}
]} />
#### Returns
##### Returns
[AbstractPaymentService](AbstractPaymentService.mdx)
@@ -12,11 +12,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Constructors
### constructor
#### constructor
`Protected **new AbstractSearchService**(container, options)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -64,35 +64,19 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Accessors
### options
#### options
`get**options**(): Record&#60;string, unknown&#62;`
#### Returns
`Record<string, unknown>`
<ParameterTypes parameters={[
{
"name": "Record",
"type": "`Record<string, unknown>`",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
**options**: [object Object]
## Methods
### addDocuments
#### addDocuments
`Abstract **addDocuments**(indexName, documents, type): unknown`
Used to index documents by the search engine provider
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -124,7 +108,7 @@ Used to index documents by the search engine provider
}
]} />
#### Returns
##### Returns
`unknown`
@@ -142,13 +126,13 @@ Used to index documents by the search engine provider
___
### createIndex
#### createIndex
`Abstract **createIndex**(indexName, options): unknown`
Used to create an index
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -171,7 +155,7 @@ Used to create an index
}
]} />
#### Returns
##### Returns
`unknown`
@@ -189,13 +173,13 @@ Used to create an index
___
### deleteAllDocuments
#### deleteAllDocuments
`Abstract **deleteAllDocuments**(indexName): unknown`
Used to delete all documents
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -209,7 +193,7 @@ Used to delete all documents
}
]} />
#### Returns
##### Returns
`unknown`
@@ -227,13 +211,13 @@ Used to delete all documents
___
### deleteDocument
#### deleteDocument
`Abstract **deleteDocument**(indexName, document_id): unknown`
Used to delete document
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -256,7 +240,7 @@ Used to delete document
}
]} />
#### Returns
##### Returns
`unknown`
@@ -274,13 +258,13 @@ Used to delete document
___
### getIndex
#### getIndex
`Abstract **getIndex**(indexName): unknown`
Used to get an index
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -294,7 +278,7 @@ Used to get an index
}
]} />
#### Returns
##### Returns
`unknown`
@@ -312,13 +296,13 @@ Used to get an index
___
### replaceDocuments
#### replaceDocuments
`Abstract **replaceDocuments**(indexName, documents, type): unknown`
Used to replace documents
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -350,7 +334,7 @@ Used to replace documents
}
]} />
#### Returns
##### Returns
`unknown`
@@ -368,13 +352,13 @@ Used to replace documents
___
### search
#### search
`Abstract **search**(indexName, query, options): unknown`
Used to search for a document in an index
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -406,7 +390,7 @@ Used to search for a document in an index
}
]} />
#### Returns
##### Returns
`unknown`
@@ -424,13 +408,13 @@ Used to search for a document in an index
___
### updateSettings
#### updateSettings
`Abstract **updateSettings**(indexName, settings): unknown`
Used to update the settings of an index
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -453,7 +437,7 @@ Used to update the settings of an index
}
]} />
#### Returns
##### Returns
`unknown`
@@ -10,7 +10,7 @@ An address is used across the Medusa backend within other schemas and object typ
## Constructors
### constructor
#### constructor
`**new Address**()`
@@ -185,11 +185,11 @@ An address is used across the Medusa backend within other schemas and object typ
## Methods
### beforeInsert
#### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
##### Returns
`void`
@@ -10,7 +10,7 @@ Address fields used when creating an address.
## Constructors
### constructor
#### constructor
`**new AddressCreatePayload**()`
@@ -10,7 +10,7 @@ Address fields used when creating/updating an address.
## Constructors
### constructor
#### constructor
`**new AddressPayload**()`
@@ -10,7 +10,7 @@ Filters to apply on discounts' rules.
## Constructors
### constructor
#### constructor
`**new AdminGetDiscountsDiscountRuleParams**()`
@@ -8,7 +8,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Constructors
### constructor
#### constructor
`**new AdminPriceListPricesCreateReq**()`
@@ -8,7 +8,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Constructors
### constructor
#### constructor
`**new AdminPriceListPricesUpdateReq**()`
@@ -10,7 +10,7 @@ Base abstract entity for all entities
## Constructors
### constructor
#### constructor
`**new AnalyticsConfig**()`
@@ -84,11 +84,11 @@ Base abstract entity for all entities
## Methods
### beforeInsert
#### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
##### Returns
`void`
@@ -8,11 +8,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Constructors
### constructor
#### constructor
`**new AnalyticsConfigService**(«destructured»)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -96,29 +96,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Accessors
### activeManager\_
#### activeManager\_
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
`Protected` **activeManager\_**: [object Object]
## Methods
### atomicPhase\_
#### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -126,6 +110,8 @@ 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",
@@ -147,7 +133,7 @@ transaction manager is created.
}
]} />
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -179,7 +165,7 @@ transaction manager is created.
}
]} />
#### Returns
##### Returns
Promise&#60;TResult&#62;
@@ -197,13 +183,13 @@ Promise&#60;TResult&#62;
___
### create
#### create
`**create**(userId, data): Promise&#60;[AnalyticsConfig](AnalyticsConfig.mdx)&#62;`
Creates an analytics config.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -226,7 +212,7 @@ Creates an analytics config.
}
]} />
#### Returns
##### Returns
Promise&#60;[AnalyticsConfig](AnalyticsConfig.mdx)&#62;
@@ -244,13 +230,13 @@ Promise&#60;[AnalyticsConfig](AnalyticsConfig.mdx)&#62;
___
### delete
#### delete
`**delete**(userId): Promise&#60;void&#62;`
Deletes an analytics config.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -264,7 +250,7 @@ Deletes an analytics config.
}
]} />
#### Returns
##### Returns
Promise&#60;void&#62;
@@ -282,11 +268,11 @@ Promise&#60;void&#62;
___
### retrieve
#### retrieve
`**retrieve**(userId): Promise&#60;[AnalyticsConfig](AnalyticsConfig.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -300,7 +286,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[AnalyticsConfig](AnalyticsConfig.mdx)&#62;
@@ -318,11 +304,11 @@ Promise&#60;[AnalyticsConfig](AnalyticsConfig.mdx)&#62;
___
### shouldRetryTransaction\_
#### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -336,7 +322,7 @@ ___
}
]} />
#### Returns
##### Returns
`boolean`
@@ -354,13 +340,13 @@ ___
___
### update
#### update
`**update**(userId, update): Promise&#60;[AnalyticsConfig](AnalyticsConfig.mdx)&#62;`
Updates an analytics config. If the config does not exist, it will be created instead.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -383,7 +369,7 @@ Updates an analytics config. If the config does not exist, it will be created in
}
]} />
#### Returns
##### Returns
Promise&#60;[AnalyticsConfig](AnalyticsConfig.mdx)&#62;
@@ -401,11 +387,11 @@ Promise&#60;[AnalyticsConfig](AnalyticsConfig.mdx)&#62;
___
### withTransaction
#### withTransaction
`**withTransaction**(transactionManager?): [AnalyticsConfigService](AnalyticsConfigService.mdx)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -419,7 +405,7 @@ ___
}
]} />
#### Returns
##### Returns
[AnalyticsConfigService](AnalyticsConfigService.mdx)
@@ -10,11 +10,11 @@ Can authenticate a user based on email password combination
## Constructors
### constructor
#### constructor
`**new AuthService**(«destructured»)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -98,29 +98,13 @@ Can authenticate a user based on email password combination
## Accessors
### activeManager\_
#### activeManager\_
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
`Protected` **activeManager\_**: [object Object]
## Methods
### atomicPhase\_
#### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -128,6 +112,8 @@ 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",
@@ -149,7 +135,7 @@ transaction manager is created.
}
]} />
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -181,7 +167,7 @@ transaction manager is created.
}
]} />
#### Returns
##### Returns
Promise&#60;TResult&#62;
@@ -199,14 +185,14 @@ Promise&#60;TResult&#62;
___
### authenticate
#### authenticate
`**authenticate**(email, password): Promise&#60;[AuthenticateResult](../types/AuthenticateResult.mdx)&#62;`
Authenticates a given user based on an email, password combination. Uses
scrypt to match password with hashed value.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -229,7 +215,7 @@ scrypt to match password with hashed value.
}
]} />
#### Returns
##### Returns
Promise&#60;[AuthenticateResult](../types/AuthenticateResult.mdx)&#62;
@@ -247,13 +233,13 @@ Promise&#60;[AuthenticateResult](../types/AuthenticateResult.mdx)&#62;
___
### authenticateAPIToken
#### authenticateAPIToken
`**authenticateAPIToken**(token): Promise&#60;[AuthenticateResult](../types/AuthenticateResult.mdx)&#62;`
Authenticates a given user with an API token
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -267,7 +253,7 @@ Authenticates a given user with an API token
}
]} />
#### Returns
##### Returns
Promise&#60;[AuthenticateResult](../types/AuthenticateResult.mdx)&#62;
@@ -285,14 +271,14 @@ Promise&#60;[AuthenticateResult](../types/AuthenticateResult.mdx)&#62;
___
### authenticateCustomer
#### authenticateCustomer
`**authenticateCustomer**(email, password): Promise&#60;[AuthenticateResult](../types/AuthenticateResult.mdx)&#62;`
Authenticates a customer based on an email, password combination. Uses
scrypt to match password with hashed value.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -315,7 +301,7 @@ scrypt to match password with hashed value.
}
]} />
#### Returns
##### Returns
Promise&#60;[AuthenticateResult](../types/AuthenticateResult.mdx)&#62;
@@ -333,13 +319,13 @@ Promise&#60;[AuthenticateResult](../types/AuthenticateResult.mdx)&#62;
___
### comparePassword\_
#### comparePassword\_
`Protected **comparePassword_**(password, hash): Promise&#60;boolean&#62;`
Verifies if a password is valid given the provided password hash
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -362,7 +348,7 @@ Verifies if a password is valid given the provided password hash
}
]} />
#### Returns
##### Returns
Promise&#60;boolean&#62;
@@ -380,11 +366,11 @@ Promise&#60;boolean&#62;
___
### shouldRetryTransaction\_
#### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -398,7 +384,7 @@ ___
}
]} />
#### Returns
##### Returns
`boolean`
@@ -416,11 +402,11 @@ ___
___
### withTransaction
#### withTransaction
`**withTransaction**(transactionManager?): [AuthService](AuthService.mdx)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -434,7 +420,7 @@ ___
}
]} />
#### Returns
##### Returns
[AuthService](AuthService.mdx)
@@ -10,7 +10,7 @@ Base abstract entity for all entities
## Constructors
### constructor
#### constructor
`**new BaseEntity**()`
@@ -10,7 +10,7 @@ A Batch Job indicates an asynchronus task stored in the Medusa backend. Its stat
## Constructors
### constructor
#### constructor
`**new BatchJob**()`
@@ -176,11 +176,11 @@ A Batch Job indicates an asynchronus task stored in the Medusa backend. Its stat
## Methods
### beforeInsert
#### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
##### Returns
`void`
@@ -198,11 +198,11 @@ A Batch Job indicates an asynchronus task stored in the Medusa backend. Its stat
___
### loadStatus
#### loadStatus
`**loadStatus**(): void`
#### Returns
##### Returns
`void`
@@ -220,13 +220,13 @@ ___
___
### toJSON
#### toJSON
`**toJSON**(): [BatchJob](BatchJob.mdx)`
A Batch Job indicates an asynchronus task stored in the Medusa backend. Its status determines whether it has been executed or not.
#### Returns
##### Returns
[BatchJob](BatchJob.mdx)
@@ -8,11 +8,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Constructors
### constructor
#### constructor
`**new BatchJobService**(«destructured»)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -195,29 +195,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Accessors
### activeManager\_
#### activeManager\_
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
`Protected` **activeManager\_**: [object Object]
## Methods
### atomicPhase\_
#### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -225,6 +209,8 @@ 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",
@@ -246,7 +232,7 @@ transaction manager is created.
}
]} />
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -278,7 +264,7 @@ transaction manager is created.
}
]} />
#### Returns
##### Returns
Promise&#60;TResult&#62;
@@ -296,11 +282,11 @@ Promise&#60;TResult&#62;
___
### cancel
#### cancel
`**cancel**(batchJobOrId): Promise&#60;[BatchJob](BatchJob.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -314,7 +300,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[BatchJob](BatchJob.mdx)&#62;
@@ -332,11 +318,11 @@ Promise&#60;[BatchJob](BatchJob.mdx)&#62;
___
### complete
#### complete
`**complete**(batchJobOrId): Promise&#60;[BatchJob](BatchJob.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -350,7 +336,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[BatchJob](BatchJob.mdx)&#62;
@@ -368,11 +354,11 @@ Promise&#60;[BatchJob](BatchJob.mdx)&#62;
___
### confirm
#### confirm
`**confirm**(batchJobOrId): Promise&#60;[BatchJob](BatchJob.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -386,7 +372,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[BatchJob](BatchJob.mdx)&#62;
@@ -404,11 +390,11 @@ Promise&#60;[BatchJob](BatchJob.mdx)&#62;
___
### create
#### create
`**create**(data): Promise&#60;[BatchJob](BatchJob.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -422,7 +408,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[BatchJob](BatchJob.mdx)&#62;
@@ -440,11 +426,11 @@ Promise&#60;[BatchJob](BatchJob.mdx)&#62;
___
### listAndCount
#### listAndCount
`**listAndCount**(selector?, config?): Promise&#60;[[BatchJob](BatchJob.mdx)[], number]&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -467,7 +453,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[[BatchJob](BatchJob.mdx)[], number]&#62;
@@ -485,11 +471,11 @@ Promise&#60;[[BatchJob](BatchJob.mdx)[], number]&#62;
___
### prepareBatchJobForProcessing
#### prepareBatchJobForProcessing
`**prepareBatchJobForProcessing**(data, req): Promise&#60;[CreateBatchJobInput](../types/CreateBatchJobInput.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -512,7 +498,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[CreateBatchJobInput](../types/CreateBatchJobInput.mdx)&#62;
@@ -530,11 +516,11 @@ Promise&#60;[CreateBatchJobInput](../types/CreateBatchJobInput.mdx)&#62;
___
### retrieve
#### retrieve
`**retrieve**(batchJobId, config?): Promise&#60;[BatchJob](BatchJob.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -557,7 +543,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[BatchJob](BatchJob.mdx)&#62;
@@ -575,11 +561,11 @@ Promise&#60;[BatchJob](BatchJob.mdx)&#62;
___
### setFailed
#### setFailed
`**setFailed**(batchJobOrId, error?): Promise&#60;[BatchJob](BatchJob.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -602,7 +588,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[BatchJob](BatchJob.mdx)&#62;
@@ -620,11 +606,11 @@ Promise&#60;[BatchJob](BatchJob.mdx)&#62;
___
### setPreProcessingDone
#### setPreProcessingDone
`**setPreProcessingDone**(batchJobOrId): Promise&#60;[BatchJob](BatchJob.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -638,7 +624,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[BatchJob](BatchJob.mdx)&#62;
@@ -656,11 +642,11 @@ Promise&#60;[BatchJob](BatchJob.mdx)&#62;
___
### setProcessing
#### setProcessing
`**setProcessing**(batchJobOrId): Promise&#60;[BatchJob](BatchJob.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -674,7 +660,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[BatchJob](BatchJob.mdx)&#62;
@@ -692,11 +678,11 @@ Promise&#60;[BatchJob](BatchJob.mdx)&#62;
___
### shouldRetryTransaction\_
#### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -710,7 +696,7 @@ ___
}
]} />
#### Returns
##### Returns
`boolean`
@@ -728,11 +714,11 @@ ___
___
### update
#### update
`**update**(batchJobOrId, data): Promise&#60;[BatchJob](BatchJob.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -755,7 +741,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[BatchJob](BatchJob.mdx)&#62;
@@ -773,11 +759,11 @@ Promise&#60;[BatchJob](BatchJob.mdx)&#62;
___
### updateStatus
#### updateStatus
`Protected **updateStatus**(batchJobOrId, status): Promise&#60;[BatchJob](BatchJob.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -800,7 +786,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[BatchJob](BatchJob.mdx)&#62;
@@ -818,11 +804,11 @@ Promise&#60;[BatchJob](BatchJob.mdx)&#62;
___
### withTransaction
#### withTransaction
`**withTransaction**(transactionManager?): [BatchJobService](BatchJobService.mdx)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -836,7 +822,7 @@ ___
}
]} />
#### Returns
##### Returns
[BatchJobService](BatchJobService.mdx)
@@ -10,7 +10,7 @@ A cart represents a virtual shopping bag. It can be used to complete an order, a
## Constructors
### constructor
#### constructor
`**new Cart**()`
@@ -401,11 +401,11 @@ A cart represents a virtual shopping bag. It can be used to complete an order, a
## Methods
### afterLoad
#### afterLoad
`Private **afterLoad**(): void`
#### Returns
##### Returns
`void`
@@ -423,11 +423,11 @@ A cart represents a virtual shopping bag. It can be used to complete an order, a
___
### beforeInsert
#### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
##### Returns
`void`
File diff suppressed because it is too large. Load diff
@@ -10,7 +10,7 @@ The details of an image attached to a claim.
## Constructors
### constructor
#### constructor
`**new ClaimImage**()`
@@ -95,11 +95,11 @@ The details of an image attached to a claim.
## Methods
### beforeInsert
#### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
##### Returns
`void`
@@ -10,7 +10,7 @@ A claim item is an item created as part of a claim. It references an item in the
## Constructors
### constructor
#### constructor
`**new ClaimItem**()`
@@ -167,11 +167,11 @@ A claim item is an item created as part of a claim. It references an item in the
## Methods
### beforeInsert
#### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
##### Returns
`void`
@@ -8,11 +8,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Constructors
### constructor
#### constructor
`**new ClaimItemService**(«destructured»)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -159,29 +159,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Accessors
### activeManager\_
#### activeManager\_
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
`Protected` **activeManager\_**: [object Object]
## Methods
### atomicPhase\_
#### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -189,6 +173,8 @@ 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",
@@ -210,7 +196,7 @@ transaction manager is created.
}
]} />
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -242,7 +228,7 @@ transaction manager is created.
}
]} />
#### Returns
##### Returns
Promise&#60;TResult&#62;
@@ -260,11 +246,11 @@ Promise&#60;TResult&#62;
___
### create
#### create
`**create**(data): Promise&#60;[ClaimItem](ClaimItem.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -278,7 +264,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[ClaimItem](ClaimItem.mdx)&#62;
@@ -296,11 +282,11 @@ Promise&#60;[ClaimItem](ClaimItem.mdx)&#62;
___
### list
#### list
`**list**(selector, config?): Promise&#60;[ClaimItem](ClaimItem.mdx)[]&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -323,7 +309,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[ClaimItem](ClaimItem.mdx)[]&#62;
@@ -341,13 +327,13 @@ Promise&#60;[ClaimItem](ClaimItem.mdx)[]&#62;
___
### retrieve
#### retrieve
`**retrieve**(claimItemId, config?): Promise&#60;[ClaimItem](ClaimItem.mdx)&#62;`
Gets a claim item by id.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -370,7 +356,7 @@ Gets a claim item by id.
}
]} />
#### Returns
##### Returns
Promise&#60;[ClaimItem](ClaimItem.mdx)&#62;
@@ -388,11 +374,11 @@ Promise&#60;[ClaimItem](ClaimItem.mdx)&#62;
___
### shouldRetryTransaction\_
#### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -406,7 +392,7 @@ ___
}
]} />
#### Returns
##### Returns
`boolean`
@@ -424,11 +410,11 @@ ___
___
### update
#### update
`**update**(id, data): Promise&#60;[ClaimItem](ClaimItem.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -451,7 +437,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[ClaimItem](ClaimItem.mdx)&#62;
@@ -469,11 +455,11 @@ Promise&#60;[ClaimItem](ClaimItem.mdx)&#62;
___
### withTransaction
#### withTransaction
`**withTransaction**(transactionManager?): [ClaimItemService](ClaimItemService.mdx)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -487,7 +473,7 @@ ___
}
]} />
#### Returns
##### Returns
[ClaimItemService](ClaimItemService.mdx)
@@ -10,7 +10,7 @@ A Claim represents a group of faulty or missing items. It consists of claim item
## Constructors
### constructor
#### constructor
`**new ClaimOrder**()`
@@ -212,11 +212,11 @@ A Claim represents a group of faulty or missing items. It consists of claim item
## Methods
### beforeInsert
#### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
##### Returns
`void`
@@ -8,11 +8,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Constructors
### constructor
#### constructor
`**new ClaimService**(«destructured»)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -285,29 +285,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Accessors
### activeManager\_
#### activeManager\_
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
`Protected` **activeManager\_**: [object Object]
## Methods
### atomicPhase\_
#### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -315,6 +299,8 @@ 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",
@@ -336,7 +322,7 @@ transaction manager is created.
}
]} />
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -368,7 +354,7 @@ transaction manager is created.
}
]} />
#### Returns
##### Returns
Promise&#60;TResult&#62;
@@ -386,11 +372,11 @@ Promise&#60;TResult&#62;
___
### cancel
#### cancel
`**cancel**(id): Promise&#60;[ClaimOrder](ClaimOrder.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -404,7 +390,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[ClaimOrder](ClaimOrder.mdx)&#62;
@@ -422,11 +408,11 @@ Promise&#60;[ClaimOrder](ClaimOrder.mdx)&#62;
___
### cancelFulfillment
#### cancelFulfillment
`**cancelFulfillment**(fulfillmentId): Promise&#60;[ClaimOrder](ClaimOrder.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -440,7 +426,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[ClaimOrder](ClaimOrder.mdx)&#62;
@@ -458,7 +444,7 @@ Promise&#60;[ClaimOrder](ClaimOrder.mdx)&#62;
___
### create
#### create
`**create**(data): Promise&#60;[ClaimOrder](ClaimOrder.mdx)&#62;`
@@ -466,7 +452,7 @@ 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
##### Parameters
<ParameterTypes parameters={[
{
@@ -480,7 +466,7 @@ shipping address that the new items will be shipped to
}
]} />
#### Returns
##### Returns
Promise&#60;[ClaimOrder](ClaimOrder.mdx)&#62;
@@ -498,11 +484,11 @@ Promise&#60;[ClaimOrder](ClaimOrder.mdx)&#62;
___
### createFulfillment
#### createFulfillment
`**createFulfillment**(id, config?): Promise&#60;[ClaimOrder](ClaimOrder.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -552,7 +538,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[ClaimOrder](ClaimOrder.mdx)&#62;
@@ -570,11 +556,11 @@ Promise&#60;[ClaimOrder](ClaimOrder.mdx)&#62;
___
### createShipment
#### createShipment
`**createShipment**(id, fulfillmentId, trackingLinks?, config?): Promise&#60;[ClaimOrder](ClaimOrder.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -633,7 +619,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[ClaimOrder](ClaimOrder.mdx)&#62;
@@ -651,7 +637,7 @@ Promise&#60;[ClaimOrder](ClaimOrder.mdx)&#62;
___
### getRefundTotalForClaimLinesOnOrder
#### getRefundTotalForClaimLinesOnOrder
`Protected **getRefundTotalForClaimLinesOnOrder**(order, claimItems): Promise&#60;number&#62;`
@@ -662,7 +648,7 @@ There are three places too look:
- 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
##### Parameters
<ParameterTypes parameters={[
{
@@ -685,7 +671,7 @@ Note, it will attempt to return early from each of these places to avoid having
}
]} />
#### Returns
##### Returns
Promise&#60;number&#62;
@@ -703,11 +689,11 @@ Promise&#60;number&#62;
___
### list
#### list
`**list**(selector, config?): Promise&#60;[ClaimOrder](ClaimOrder.mdx)[]&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -730,7 +716,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[ClaimOrder](ClaimOrder.mdx)[]&#62;
@@ -748,11 +734,11 @@ Promise&#60;[ClaimOrder](ClaimOrder.mdx)[]&#62;
___
### processRefund
#### processRefund
`**processRefund**(id): Promise&#60;[ClaimOrder](ClaimOrder.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -766,7 +752,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[ClaimOrder](ClaimOrder.mdx)&#62;
@@ -784,13 +770,13 @@ Promise&#60;[ClaimOrder](ClaimOrder.mdx)&#62;
___
### retrieve
#### retrieve
`**retrieve**(claimId, config?): Promise&#60;[ClaimOrder](ClaimOrder.mdx)&#62;`
Gets an order by id.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -813,7 +799,7 @@ Gets an order by id.
}
]} />
#### Returns
##### Returns
Promise&#60;[ClaimOrder](ClaimOrder.mdx)&#62;
@@ -831,11 +817,11 @@ Promise&#60;[ClaimOrder](ClaimOrder.mdx)&#62;
___
### shouldRetryTransaction\_
#### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -849,7 +835,7 @@ ___
}
]} />
#### Returns
##### Returns
`boolean`
@@ -867,11 +853,11 @@ ___
___
### update
#### update
`**update**(id, data): Promise&#60;[ClaimOrder](ClaimOrder.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -894,7 +880,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[ClaimOrder](ClaimOrder.mdx)&#62;
@@ -912,11 +898,11 @@ Promise&#60;[ClaimOrder](ClaimOrder.mdx)&#62;
___
### validateCreateClaimInput
#### validateCreateClaimInput
`Protected **validateCreateClaimInput**(data): Promise&#60;void&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -930,7 +916,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;void&#62;
@@ -948,11 +934,11 @@ Promise&#60;void&#62;
___
### withTransaction
#### withTransaction
`**withTransaction**(transactionManager?): [ClaimService](ClaimService.mdx)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -966,7 +952,7 @@ ___
}
]} />
#### Returns
##### Returns
[ClaimService](ClaimService.mdx)
@@ -10,7 +10,7 @@ Claim Tags are user defined tags that can be assigned to claim items for easy fi
## Constructors
### constructor
#### constructor
`**new ClaimTag**()`
@@ -77,11 +77,11 @@ Claim Tags are user defined tags that can be assigned to claim items for easy fi
## Methods
### beforeInsert
#### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
##### Returns
`void`
@@ -10,7 +10,7 @@ Country details
## Constructors
### constructor
#### constructor
`**new Country**()`
@@ -10,7 +10,7 @@ Currency
## Constructors
### constructor
#### constructor
`**new Currency**()`
@@ -8,11 +8,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Constructors
### constructor
#### constructor
`**new CurrencyService**(«destructured»)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -123,29 +123,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Accessors
### activeManager\_
#### activeManager\_
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
`Protected` **activeManager\_**: [object Object]
## Methods
### atomicPhase\_
#### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -153,6 +137,8 @@ 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",
@@ -174,7 +160,7 @@ transaction manager is created.
}
]} />
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -206,7 +192,7 @@ transaction manager is created.
}
]} />
#### Returns
##### Returns
Promise&#60;TResult&#62;
@@ -224,14 +210,14 @@ Promise&#60;TResult&#62;
___
### listAndCount
#### listAndCount
`**listAndCount**(selector, config?): Promise&#60;[[Currency](Currency.mdx)[], number]&#62;`
Lists currencies based on the provided parameters and includes the count of
currencies that match the query.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -254,7 +240,7 @@ currencies that match the query.
}
]} />
#### Returns
##### Returns
Promise&#60;[[Currency](Currency.mdx)[], number]&#62;
@@ -272,13 +258,13 @@ Promise&#60;[[Currency](Currency.mdx)[], number]&#62;
___
### retrieveByCode
#### retrieveByCode
`**retrieveByCode**(code): Promise&#60;[Currency](Currency.mdx)&#62;`
Return the currency
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -292,7 +278,7 @@ Return the currency
}
]} />
#### Returns
##### Returns
Promise&#60;[Currency](Currency.mdx)&#62;
@@ -310,11 +296,11 @@ Promise&#60;[Currency](Currency.mdx)&#62;
___
### shouldRetryTransaction\_
#### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -328,7 +314,7 @@ ___
}
]} />
#### Returns
##### Returns
`boolean`
@@ -346,13 +332,13 @@ ___
___
### update
#### update
`**update**(code, data): Promise&#60;undefined \| [Currency](Currency.mdx)&#62;`
Update a currency
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -375,7 +361,7 @@ Update a currency
}
]} />
#### Returns
##### Returns
Promise&#60;undefined \| [Currency](Currency.mdx)&#62;
@@ -393,11 +379,11 @@ Promise&#60;undefined \| [Currency](Currency.mdx)&#62;
___
### withTransaction
#### withTransaction
`**withTransaction**(transactionManager?): [CurrencyService](CurrencyService.mdx)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -411,7 +397,7 @@ ___
}
]} />
#### Returns
##### Returns
[CurrencyService](CurrencyService.mdx)
@@ -10,7 +10,7 @@ Custom Shipping Options are overridden Shipping Options. Admins can attach a Cus
## Constructors
### constructor
#### constructor
`**new CustomShippingOption**()`
@@ -113,11 +113,11 @@ Custom Shipping Options are overridden Shipping Options. Admins can attach a Cus
## Methods
### beforeInsert
#### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
##### Returns
`void`
@@ -8,11 +8,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Constructors
### constructor
#### constructor
`**new CustomShippingOptionService**(«destructured»)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -87,29 +87,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Accessors
### activeManager\_
#### activeManager\_
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
`Protected` **activeManager\_**: [object Object]
## Methods
### atomicPhase\_
#### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -117,6 +101,8 @@ 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",
@@ -138,7 +124,7 @@ transaction manager is created.
}
]} />
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -170,7 +156,7 @@ transaction manager is created.
}
]} />
#### Returns
##### Returns
Promise&#60;TResult&#62;
@@ -188,12 +174,14 @@ Promise&#60;TResult&#62;
___
### create
#### create
`**create**<TypeParameter T, TypeParameter TResult>(data): Promise&#60;TResult&#62;`
Creates a custom shipping option
##### Type Parameters
<ParameterTypes parameters={[
{
"name": "T",
@@ -215,7 +203,7 @@ Creates a custom shipping option
}
]} />
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -229,7 +217,7 @@ Creates a custom shipping option
}
]} />
#### Returns
##### Returns
Promise&#60;TResult&#62;
@@ -247,13 +235,13 @@ Promise&#60;TResult&#62;
___
### list
#### list
`**list**(selector, config?): Promise&#60;[CustomShippingOption](CustomShippingOption.mdx)[]&#62;`
Fetches all custom shipping options based on the given selector
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -276,7 +264,7 @@ Fetches all custom shipping options based on the given selector
}
]} />
#### Returns
##### Returns
Promise&#60;[CustomShippingOption](CustomShippingOption.mdx)[]&#62;
@@ -294,13 +282,13 @@ Promise&#60;[CustomShippingOption](CustomShippingOption.mdx)[]&#62;
___
### retrieve
#### retrieve
`**retrieve**(id, config?): Promise&#60;[CustomShippingOption](CustomShippingOption.mdx)&#62;`
Retrieves a specific shipping option.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -323,7 +311,7 @@ Retrieves a specific shipping option.
}
]} />
#### Returns
##### Returns
Promise&#60;[CustomShippingOption](CustomShippingOption.mdx)&#62;
@@ -341,11 +329,11 @@ Promise&#60;[CustomShippingOption](CustomShippingOption.mdx)&#62;
___
### shouldRetryTransaction\_
#### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -359,7 +347,7 @@ ___
}
]} />
#### Returns
##### Returns
`boolean`
@@ -377,11 +365,11 @@ ___
___
### withTransaction
#### withTransaction
`**withTransaction**(transactionManager?): [CustomShippingOptionService](CustomShippingOptionService.mdx)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -395,7 +383,7 @@ ___
}
]} />
#### Returns
##### Returns
[CustomShippingOptionService](CustomShippingOptionService.mdx)
@@ -10,7 +10,7 @@ A customer can make purchases in your store and manage their profile.
## Constructors
### constructor
#### constructor
`**new Customer**()`
@@ -167,11 +167,11 @@ A customer can make purchases in your store and manage their profile.
## Methods
### beforeInsert
#### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
##### Returns
`void`
@@ -10,7 +10,7 @@ A customer group that can be used to organize customers into groups of similar t
## Constructors
### constructor
#### constructor
`**new CustomerGroup**()`
@@ -95,11 +95,11 @@ A customer group that can be used to organize customers into groups of similar t
## Methods
### beforeInsert
#### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
##### Returns
`void`
@@ -8,11 +8,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Constructors
### constructor
#### constructor
`**new CustomerGroupService**(«destructured»)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -96,35 +96,19 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Accessors
### activeManager\_
#### activeManager\_
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
`Protected` **activeManager\_**: [object Object]
## Methods
### addCustomers
#### addCustomers
`**addCustomers**(id, customerIds): Promise&#60;[CustomerGroup](CustomerGroup.mdx)&#62;`
Add a batch of customers to a customer group at once
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -147,7 +131,7 @@ Add a batch of customers to a customer group at once
}
]} />
#### Returns
##### Returns
Promise&#60;[CustomerGroup](CustomerGroup.mdx)&#62;
@@ -165,7 +149,7 @@ Promise&#60;[CustomerGroup](CustomerGroup.mdx)&#62;
___
### atomicPhase\_
#### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -173,6 +157,8 @@ 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",
@@ -194,7 +180,7 @@ transaction manager is created.
}
]} />
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -226,7 +212,7 @@ transaction manager is created.
}
]} />
#### Returns
##### Returns
Promise&#60;TResult&#62;
@@ -244,13 +230,13 @@ Promise&#60;TResult&#62;
___
### create
#### create
`**create**(group): Promise&#60;[CustomerGroup](CustomerGroup.mdx)&#62;`
Creates a customer group with the provided data.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -264,7 +250,7 @@ Creates a customer group with the provided data.
}
]} />
#### Returns
##### Returns
Promise&#60;[CustomerGroup](CustomerGroup.mdx)&#62;
@@ -282,13 +268,13 @@ Promise&#60;[CustomerGroup](CustomerGroup.mdx)&#62;
___
### delete
#### delete
`**delete**(groupId): Promise&#60;void&#62;`
Remove customer group
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -302,7 +288,7 @@ Remove customer group
}
]} />
#### Returns
##### Returns
Promise&#60;void&#62;
@@ -320,11 +306,11 @@ Promise&#60;void&#62;
___
### handleCreationFail
#### handleCreationFail
`Private **handleCreationFail**(id, ids, error): Promise&#60;never&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -356,7 +342,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;never&#62;
@@ -374,13 +360,13 @@ Promise&#60;never&#62;
___
### list
#### list
`**list**(selector?, config): Promise&#60;[CustomerGroup](CustomerGroup.mdx)[]&#62;`
List customer groups.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -403,7 +389,7 @@ List customer groups.
}
]} />
#### Returns
##### Returns
Promise&#60;[CustomerGroup](CustomerGroup.mdx)[]&#62;
@@ -421,13 +407,13 @@ Promise&#60;[CustomerGroup](CustomerGroup.mdx)[]&#62;
___
### listAndCount
#### listAndCount
`**listAndCount**(selector?, config): Promise&#60;[[CustomerGroup](CustomerGroup.mdx)[], number]&#62;`
Retrieve a list of customer groups and total count of records that match the query.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -450,7 +436,7 @@ Retrieve a list of customer groups and total count of records that match the que
}
]} />
#### Returns
##### Returns
Promise&#60;[[CustomerGroup](CustomerGroup.mdx)[], number]&#62;
@@ -468,13 +454,13 @@ Promise&#60;[[CustomerGroup](CustomerGroup.mdx)[], number]&#62;
___
### removeCustomer
#### removeCustomer
`**removeCustomer**(id, customerIds): Promise&#60;[CustomerGroup](CustomerGroup.mdx)&#62;`
Remove list of customers from a customergroup
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -497,7 +483,7 @@ Remove list of customers from a customergroup
}
]} />
#### Returns
##### Returns
Promise&#60;[CustomerGroup](CustomerGroup.mdx)&#62;
@@ -515,11 +501,11 @@ Promise&#60;[CustomerGroup](CustomerGroup.mdx)&#62;
___
### retrieve
#### retrieve
`**retrieve**(customerGroupId, config?): Promise&#60;[CustomerGroup](CustomerGroup.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -542,7 +528,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[CustomerGroup](CustomerGroup.mdx)&#62;
@@ -560,11 +546,11 @@ Promise&#60;[CustomerGroup](CustomerGroup.mdx)&#62;
___
### shouldRetryTransaction\_
#### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -578,7 +564,7 @@ ___
}
]} />
#### Returns
##### Returns
`boolean`
@@ -596,13 +582,13 @@ ___
___
### update
#### update
`**update**(customerGroupId, update): Promise&#60;[CustomerGroup](CustomerGroup.mdx)&#62;`
Update a customer group.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -625,7 +611,7 @@ Update a customer group.
}
]} />
#### Returns
##### Returns
Promise&#60;[CustomerGroup](CustomerGroup.mdx)&#62;
@@ -643,11 +629,11 @@ Promise&#60;[CustomerGroup](CustomerGroup.mdx)&#62;
___
### withTransaction
#### withTransaction
`**withTransaction**(transactionManager?): [CustomerGroupService](CustomerGroupService.mdx)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -661,7 +647,7 @@ ___
}
]} />
#### Returns
##### Returns
[CustomerGroupService](CustomerGroupService.mdx)
@@ -8,7 +8,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Constructors
### constructor
#### constructor
`**new CustomerGroupUpdate**()`
@@ -10,11 +10,11 @@ Provides layer to manipulate customers.
## Constructors
### constructor
#### constructor
`**new CustomerService**(«destructured»)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -143,33 +143,17 @@ Provides layer to manipulate customers.
## Accessors
### activeManager\_
#### activeManager\_
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
`Protected` **activeManager\_**: [object Object]
## Methods
### addAddress
#### addAddress
`**addAddress**(customerId, address): Promise&#60;[Customer](Customer.mdx) \| [Address](Address.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -192,7 +176,7 @@ EntityManager
}
]} />
#### Returns
##### Returns
Promise&#60;[Customer](Customer.mdx) \| [Address](Address.mdx)&#62;
@@ -210,7 +194,7 @@ Promise&#60;[Customer](Customer.mdx) \| [Address](Address.mdx)&#62;
___
### atomicPhase\_
#### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -218,6 +202,8 @@ 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",
@@ -239,7 +225,7 @@ transaction manager is created.
}
]} />
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -271,7 +257,7 @@ transaction manager is created.
}
]} />
#### Returns
##### Returns
Promise&#60;TResult&#62;
@@ -289,13 +275,13 @@ Promise&#60;TResult&#62;
___
### count
#### count
`**count**(): Promise&#60;number&#62;`
Return the total number of documents in database
#### Returns
##### Returns
Promise&#60;number&#62;
@@ -313,7 +299,7 @@ Promise&#60;number&#62;
___
### create
#### create
`**create**(customer): Promise&#60;[Customer](Customer.mdx)&#62;`
@@ -322,7 +308,7 @@ e.g. to login and view order history, etc. If a password is provided the
customer will automatically get an account, otherwise the customer is just
used to hold details of customers.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -336,7 +322,7 @@ used to hold details of customers.
}
]} />
#### Returns
##### Returns
Promise&#60;[Customer](Customer.mdx)&#62;
@@ -354,13 +340,13 @@ Promise&#60;[Customer](Customer.mdx)&#62;
___
### delete
#### delete
`**delete**(customerId): Promise&#60;void \| [Customer](Customer.mdx)&#62;`
Deletes a customer from a given customer id.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -374,7 +360,7 @@ Deletes a customer from a given customer id.
}
]} />
#### Returns
##### Returns
Promise&#60;void \| [Customer](Customer.mdx)&#62;
@@ -392,7 +378,7 @@ Promise&#60;void \| [Customer](Customer.mdx)&#62;
___
### generateResetPasswordToken
#### generateResetPasswordToken
`**generateResetPasswordToken**(customerId): Promise&#60;string&#62;`
@@ -402,7 +388,7 @@ The token will be signed with the customer's current password hash as a
secret a long side a payload with userId and the expiry time for the token,
which is always 15 minutes.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -416,7 +402,7 @@ which is always 15 minutes.
}
]} />
#### Returns
##### Returns
Promise&#60;string&#62;
@@ -434,13 +420,13 @@ Promise&#60;string&#62;
___
### hashPassword\_
#### hashPassword\_
`**hashPassword_**(password): Promise&#60;string&#62;`
Hashes a password
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -454,7 +440,7 @@ Hashes a password
}
]} />
#### Returns
##### Returns
Promise&#60;string&#62;
@@ -472,11 +458,11 @@ Promise&#60;string&#62;
___
### list
#### list
`**list**(selector?, config?): Promise&#60;[Customer](Customer.mdx)[]&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -499,7 +485,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[Customer](Customer.mdx)[]&#62;
@@ -517,11 +503,11 @@ Promise&#60;[Customer](Customer.mdx)[]&#62;
___
### listAndCount
#### listAndCount
`**listAndCount**(selector, config?): Promise&#60;[[Customer](Customer.mdx)[], number]&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -544,7 +530,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[[Customer](Customer.mdx)[], number]&#62;
@@ -562,11 +548,11 @@ Promise&#60;[[Customer](Customer.mdx)[], number]&#62;
___
### listByEmail
#### listByEmail
`**listByEmail**(email, config?): Promise&#60;[Customer](Customer.mdx)[]&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -589,7 +575,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[Customer](Customer.mdx)[]&#62;
@@ -607,11 +593,11 @@ Promise&#60;[Customer](Customer.mdx)[]&#62;
___
### removeAddress
#### removeAddress
`**removeAddress**(customerId, addressId): Promise&#60;void&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -634,7 +620,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;void&#62;
@@ -652,13 +638,13 @@ Promise&#60;void&#62;
___
### retrieve
#### retrieve
`**retrieve**(customerId, config?): Promise&#60;[Customer](Customer.mdx)&#62;`
Gets a customer by id.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -681,7 +667,7 @@ Gets a customer by id.
}
]} />
#### Returns
##### Returns
Promise&#60;[Customer](Customer.mdx)&#62;
@@ -699,13 +685,13 @@ Promise&#60;[Customer](Customer.mdx)&#62;
___
### retrieveByEmail
#### retrieveByEmail
`**retrieveByEmail**(email, config?): Promise&#60;[Customer](Customer.mdx)&#62;`
Gets a registered customer by email.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -728,7 +714,7 @@ Gets a registered customer by email.
}
]} />
#### Returns
##### Returns
Promise&#60;[Customer](Customer.mdx)&#62;
@@ -748,13 +734,13 @@ Promise&#60;[Customer](Customer.mdx)&#62;
___
### retrieveByPhone
#### retrieveByPhone
`**retrieveByPhone**(phone, config?): Promise&#60;[Customer](Customer.mdx)&#62;`
Gets a customer by phone.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -777,7 +763,7 @@ Gets a customer by phone.
}
]} />
#### Returns
##### Returns
Promise&#60;[Customer](Customer.mdx)&#62;
@@ -795,11 +781,11 @@ Promise&#60;[Customer](Customer.mdx)&#62;
___
### retrieveRegisteredByEmail
#### retrieveRegisteredByEmail
`**retrieveRegisteredByEmail**(email, config?): Promise&#60;[Customer](Customer.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -822,7 +808,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[Customer](Customer.mdx)&#62;
@@ -840,11 +826,11 @@ Promise&#60;[Customer](Customer.mdx)&#62;
___
### retrieveUnregisteredByEmail
#### retrieveUnregisteredByEmail
`**retrieveUnregisteredByEmail**(email, config?): Promise&#60;[Customer](Customer.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -867,7 +853,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[Customer](Customer.mdx)&#62;
@@ -885,11 +871,11 @@ Promise&#60;[Customer](Customer.mdx)&#62;
___
### retrieve\_
#### retrieve\_
`Private **retrieve_**(selector, config?): Promise&#60;[Customer](Customer.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -912,7 +898,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[Customer](Customer.mdx)&#62;
@@ -930,11 +916,11 @@ Promise&#60;[Customer](Customer.mdx)&#62;
___
### shouldRetryTransaction\_
#### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -948,7 +934,7 @@ ___
}
]} />
#### Returns
##### Returns
`boolean`
@@ -966,13 +952,13 @@ ___
___
### update
#### update
`**update**(customerId, update): Promise&#60;[Customer](Customer.mdx)&#62;`
Updates a customer.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -995,7 +981,7 @@ Updates a customer.
}
]} />
#### Returns
##### Returns
Promise&#60;[Customer](Customer.mdx)&#62;
@@ -1013,11 +999,11 @@ Promise&#60;[Customer](Customer.mdx)&#62;
___
### updateAddress
#### updateAddress
`**updateAddress**(customerId, addressId, address): Promise&#60;[Address](Address.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -1049,7 +1035,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[Address](Address.mdx)&#62;
@@ -1067,13 +1053,13 @@ Promise&#60;[Address](Address.mdx)&#62;
___
### updateBillingAddress\_
#### updateBillingAddress\_
`**updateBillingAddress_**(customer, addressOrId): Promise&#60;void&#62;`
Updates the customers' billing address.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -1096,7 +1082,7 @@ Updates the customers' billing address.
}
]} />
#### Returns
##### Returns
Promise&#60;void&#62;
@@ -1114,11 +1100,11 @@ Promise&#60;void&#62;
___
### withTransaction
#### withTransaction
`**withTransaction**(transactionManager?): [CustomerService](CustomerService.mdx)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -1132,7 +1118,7 @@ ___
}
]} />
#### Returns
##### Returns
[CustomerService](CustomerService.mdx)
@@ -10,7 +10,7 @@ Fields used to apply flexible filters on dates.
## Constructors
### constructor
#### constructor
`**new DateComparisonOperator**()`
@@ -10,7 +10,7 @@ A discount can be applied to a cart for promotional purposes.
## Constructors
### constructor
#### constructor
`**new Discount**()`
@@ -10,7 +10,7 @@ A discount can be applied to a cart for promotional purposes.
## Constructors
### constructor
#### constructor
`**new Discount**()`
@@ -185,11 +185,11 @@ A discount can be applied to a cart for promotional purposes.
## Methods
### upperCaseCodeAndTrim
#### upperCaseCodeAndTrim
`Private **upperCaseCodeAndTrim**(): void`
#### Returns
##### Returns
`void`
@@ -10,7 +10,7 @@ Holds rule conditions for when a discount is applicable
## Constructors
### constructor
#### constructor
`**new DiscountCondition**()`
@@ -149,11 +149,11 @@ Holds rule conditions for when a discount is applicable
## Methods
### beforeInsert
#### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
##### Returns
`void`
@@ -10,7 +10,7 @@ Associates a discount condition with a customer group
## Constructors
### constructor
#### constructor
`**new DiscountConditionCustomerGroup**()`
@@ -10,7 +10,7 @@ This represents the association between a discount condition and a product
## Constructors
### constructor
#### constructor
`**new DiscountConditionProduct**()`
@@ -10,7 +10,7 @@ This represents the association between a discount condition and a product colle
## Constructors
### constructor
#### constructor
`**new DiscountConditionProductCollection**()`
@@ -10,7 +10,7 @@ This represents the association between a discount condition and a product tag
## Constructors
### constructor
#### constructor
`**new DiscountConditionProductTag**()`
@@ -10,7 +10,7 @@ This represents the association between a discount condition and a product type
## Constructors
### constructor
#### constructor
`**new DiscountConditionProductType**()`
@@ -12,11 +12,11 @@ Provides layer to manipulate discount conditions.
## Constructors
### constructor
#### constructor
`**new DiscountConditionService**(«destructured»)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -100,29 +100,13 @@ Provides layer to manipulate discount conditions.
## Accessors
### activeManager\_
#### activeManager\_
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
`Protected` **activeManager\_**: [object Object]
## Methods
### atomicPhase\_
#### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -130,6 +114,8 @@ 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",
@@ -151,7 +137,7 @@ transaction manager is created.
}
]} />
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -183,7 +169,7 @@ transaction manager is created.
}
]} />
#### Returns
##### Returns
Promise&#60;TResult&#62;
@@ -201,11 +187,11 @@ Promise&#60;TResult&#62;
___
### delete
#### delete
`**delete**(discountConditionId): Promise&#60;void \| [DiscountCondition](DiscountCondition.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -219,7 +205,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;void \| [DiscountCondition](DiscountCondition.mdx)&#62;
@@ -237,11 +223,11 @@ Promise&#60;void \| [DiscountCondition](DiscountCondition.mdx)&#62;
___
### removeResources
#### removeResources
`**removeResources**(data): Promise&#60;void&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -255,7 +241,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;void&#62;
@@ -273,11 +259,11 @@ Promise&#60;void&#62;
___
### retrieve
#### retrieve
`**retrieve**(conditionId, config?): Promise&#60;[DiscountCondition](DiscountCondition.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -300,7 +286,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[DiscountCondition](DiscountCondition.mdx)&#62;
@@ -318,11 +304,11 @@ Promise&#60;[DiscountCondition](DiscountCondition.mdx)&#62;
___
### shouldRetryTransaction\_
#### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -336,7 +322,7 @@ ___
}
]} />
#### Returns
##### Returns
`boolean`
@@ -354,11 +340,11 @@ ___
___
### upsertCondition
#### upsertCondition
`**upsertCondition**(data, overrideExisting?): Promise&#60;([DiscountConditionProduct](DiscountConditionProduct.mdx) \| [DiscountConditionProductType](DiscountConditionProductType.mdx) \| [DiscountConditionProductCollection](DiscountConditionProductCollection.mdx) \| [DiscountConditionProductTag](DiscountConditionProductTag.mdx) \| [DiscountConditionCustomerGroup](DiscountConditionCustomerGroup.mdx))[]&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -381,7 +367,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;([DiscountConditionProduct](DiscountConditionProduct.mdx) \| [DiscountConditionProductType](DiscountConditionProductType.mdx) \| [DiscountConditionProductCollection](DiscountConditionProductCollection.mdx) \| [DiscountConditionProductTag](DiscountConditionProductTag.mdx) \| [DiscountConditionCustomerGroup](DiscountConditionCustomerGroup.mdx))[]&#62;
@@ -399,11 +385,11 @@ Promise&#60;([DiscountConditionProduct](DiscountConditionProduct.mdx) \| [Discou
___
### withTransaction
#### withTransaction
`**withTransaction**(transactionManager?): [DiscountConditionService](DiscountConditionService.mdx)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -417,7 +403,7 @@ ___
}
]} />
#### Returns
##### Returns
[DiscountConditionService](DiscountConditionService.mdx)
@@ -435,11 +421,11 @@ ___
___
### resolveConditionType\_
#### resolveConditionType\_
`Static Protected **resolveConditionType_**(data): undefined \| &#123; resource_ids: (string \| &#123; id: string &#125;)[] ; type: [DiscountConditionType](../enums/DiscountConditionType.mdx) &#125;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -453,7 +439,7 @@ ___
}
]} />
#### Returns
##### Returns
`undefined` \| ``{ resource_ids: (string \| &#123; id: string &#125;)[] ; type: [DiscountConditionType](../enums/DiscountConditionType.mdx) }``
@@ -10,7 +10,7 @@ A discount rule defines how a Discount is calculated when applied to a Cart.
## Constructors
### constructor
#### constructor
`**new DiscountRule**()`
@@ -113,11 +113,11 @@ A discount rule defines how a Discount is calculated when applied to a Cart.
## Methods
### beforeInsert
#### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
##### Returns
`void`
@@ -12,11 +12,11 @@ Provides layer to manipulate discounts.
## Constructors
### constructor
#### constructor
`**new DiscountService**(«destructured»)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -190,35 +190,19 @@ Provides layer to manipulate discounts.
## Accessors
### activeManager\_
#### activeManager\_
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
`Protected` **activeManager\_**: [object Object]
## Methods
### addRegion
#### addRegion
`**addRegion**(discountId, regionId): Promise&#60;[Discount](Discount.mdx)&#62;`
Adds a region to the discount regions array.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -241,7 +225,7 @@ Adds a region to the discount regions array.
}
]} />
#### Returns
##### Returns
Promise&#60;[Discount](Discount.mdx)&#62;
@@ -259,7 +243,7 @@ Promise&#60;[Discount](Discount.mdx)&#62;
___
### atomicPhase\_
#### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -267,6 +251,8 @@ 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",
@@ -288,7 +274,7 @@ transaction manager is created.
}
]} />
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -320,7 +306,7 @@ transaction manager is created.
}
]} />
#### Returns
##### Returns
Promise&#60;TResult&#62;
@@ -338,11 +324,11 @@ Promise&#60;TResult&#62;
___
### calculateDiscountForLineItem
#### calculateDiscountForLineItem
`**calculateDiscountForLineItem**(discountId, lineItem, calculationContextData): Promise&#60;number&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -374,7 +360,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;number&#62;
@@ -392,11 +378,11 @@ Promise&#60;number&#62;
___
### canApplyForCustomer
#### canApplyForCustomer
`**canApplyForCustomer**(discountRuleId, customerId): Promise&#60;boolean&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -419,7 +405,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;boolean&#62;
@@ -437,14 +423,14 @@ Promise&#60;boolean&#62;
___
### create
#### create
`**create**(discount): Promise&#60;[Discount](Discount.mdx)&#62;`
Creates a discount with provided data given that the data is validated.
Normalizes discount code to uppercase.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -458,7 +444,7 @@ Normalizes discount code to uppercase.
}
]} />
#### Returns
##### Returns
Promise&#60;[Discount](Discount.mdx)&#62;
@@ -476,13 +462,13 @@ Promise&#60;[Discount](Discount.mdx)&#62;
___
### createDynamicCode
#### createDynamicCode
`**createDynamicCode**(discountId, data): Promise&#60;[Discount](Discount.mdx)&#62;`
Creates a dynamic code for a discount id.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -505,7 +491,7 @@ Creates a dynamic code for a discount id.
}
]} />
#### Returns
##### Returns
Promise&#60;[Discount](Discount.mdx)&#62;
@@ -523,13 +509,13 @@ Promise&#60;[Discount](Discount.mdx)&#62;
___
### delete
#### delete
`**delete**(discountId): Promise&#60;void&#62;`
Deletes a discount idempotently
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -543,7 +529,7 @@ Deletes a discount idempotently
}
]} />
#### Returns
##### Returns
Promise&#60;void&#62;
@@ -561,13 +547,13 @@ Promise&#60;void&#62;
___
### deleteDynamicCode
#### deleteDynamicCode
`**deleteDynamicCode**(discountId, code): Promise&#60;void&#62;`
Deletes a dynamic code for a discount id.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -590,7 +576,7 @@ Deletes a dynamic code for a discount id.
}
]} />
#### Returns
##### Returns
Promise&#60;void&#62;
@@ -608,11 +594,11 @@ Promise&#60;void&#62;
___
### hasCustomersGroupCondition
#### hasCustomersGroupCondition
`**hasCustomersGroupCondition**(discount): boolean`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -626,7 +612,7 @@ ___
}
]} />
#### Returns
##### Returns
`boolean`
@@ -644,11 +630,11 @@ ___
___
### hasExpired
#### hasExpired
`**hasExpired**(discount): boolean`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -662,7 +648,7 @@ ___
}
]} />
#### Returns
##### Returns
`boolean`
@@ -680,11 +666,11 @@ ___
___
### hasNotStarted
#### hasNotStarted
`**hasNotStarted**(discount): boolean`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -698,7 +684,7 @@ ___
}
]} />
#### Returns
##### Returns
`boolean`
@@ -716,11 +702,11 @@ ___
___
### hasReachedLimit
#### hasReachedLimit
`**hasReachedLimit**(discount): boolean`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -734,7 +720,7 @@ ___
}
]} />
#### Returns
##### Returns
`boolean`
@@ -752,11 +738,11 @@ ___
___
### isDisabled
#### isDisabled
`**isDisabled**(discount): boolean`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -770,7 +756,7 @@ ___
}
]} />
#### Returns
##### Returns
`boolean`
@@ -788,11 +774,11 @@ ___
___
### isValidForRegion
#### isValidForRegion
`**isValidForRegion**(discount, region_id): Promise&#60;boolean&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -815,7 +801,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;boolean&#62;
@@ -833,11 +819,11 @@ Promise&#60;boolean&#62;
___
### list
#### list
`**list**(selector?, config?): Promise&#60;[Discount](Discount.mdx)[]&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -860,7 +846,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[Discount](Discount.mdx)[]&#62;
@@ -878,11 +864,11 @@ Promise&#60;[Discount](Discount.mdx)[]&#62;
___
### listAndCount
#### listAndCount
`**listAndCount**(selector?, config?): Promise&#60;[[Discount](Discount.mdx)[], number]&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -905,7 +891,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[[Discount](Discount.mdx)[], number]&#62;
@@ -923,13 +909,13 @@ Promise&#60;[[Discount](Discount.mdx)[], number]&#62;
___
### listByCodes
#### listByCodes
`**listByCodes**(discountCodes, config?): Promise&#60;[Discount](Discount.mdx)[]&#62;`
List all the discounts corresponding to the given codes
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -952,7 +938,7 @@ List all the discounts corresponding to the given codes
}
]} />
#### Returns
##### Returns
Promise&#60;[Discount](Discount.mdx)[]&#62;
@@ -970,13 +956,13 @@ Promise&#60;[Discount](Discount.mdx)[]&#62;
___
### removeRegion
#### removeRegion
`**removeRegion**(discountId, regionId): Promise&#60;[Discount](Discount.mdx)&#62;`
Removes a region from the discount regions array.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -999,7 +985,7 @@ Removes a region from the discount regions array.
}
]} />
#### Returns
##### Returns
Promise&#60;[Discount](Discount.mdx)&#62;
@@ -1017,13 +1003,13 @@ Promise&#60;[Discount](Discount.mdx)&#62;
___
### retrieve
#### retrieve
`**retrieve**(discountId, config?): Promise&#60;[Discount](Discount.mdx)&#62;`
Gets a discount by id.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -1046,7 +1032,7 @@ Gets a discount by id.
}
]} />
#### Returns
##### Returns
Promise&#60;[Discount](Discount.mdx)&#62;
@@ -1064,13 +1050,13 @@ Promise&#60;[Discount](Discount.mdx)&#62;
___
### retrieveByCode
#### retrieveByCode
`**retrieveByCode**(discountCode, config?): Promise&#60;[Discount](Discount.mdx)&#62;`
Gets the discount by discount code.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -1093,7 +1079,7 @@ Gets the discount by discount code.
}
]} />
#### Returns
##### Returns
Promise&#60;[Discount](Discount.mdx)&#62;
@@ -1111,11 +1097,11 @@ Promise&#60;[Discount](Discount.mdx)&#62;
___
### shouldRetryTransaction\_
#### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -1129,7 +1115,7 @@ ___
}
]} />
#### Returns
##### Returns
`boolean`
@@ -1147,13 +1133,13 @@ ___
___
### update
#### update
`**update**(discountId, update): Promise&#60;[Discount](Discount.mdx)&#62;`
Updates a discount.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -1176,7 +1162,7 @@ Updates a discount.
}
]} />
#### Returns
##### Returns
Promise&#60;[Discount](Discount.mdx)&#62;
@@ -1194,11 +1180,11 @@ Promise&#60;[Discount](Discount.mdx)&#62;
___
### validateDiscountForCartOrThrow
#### validateDiscountForCartOrThrow
`**validateDiscountForCartOrThrow**(cart, discount): Promise&#60;void&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -1221,7 +1207,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;void&#62;
@@ -1239,11 +1225,11 @@ Promise&#60;void&#62;
___
### validateDiscountForProduct
#### validateDiscountForProduct
`**validateDiscountForProduct**(discountRuleId, productId?): Promise&#60;boolean&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -1266,7 +1252,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;boolean&#62;
@@ -1284,12 +1270,14 @@ Promise&#60;boolean&#62;
___
### validateDiscountRule\_
#### validateDiscountRule\_
`**validateDiscountRule_**<TypeParameter T>(discountRule): T`
Creates a discount rule with provided data given that the data is validated.
##### Type Parameters
<ParameterTypes parameters={[
{
"name": "T",
@@ -1302,7 +1290,7 @@ Creates a discount rule with provided data given that the data is validated.
}
]} />
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -1316,19 +1304,29 @@ Creates a discount rule with provided data given that the data is validated.
}
]} />
#### Returns
##### Returns
`T`
<ParameterTypes parameters={[]} />
<ParameterTypes parameters={[
{
"name": "T",
"type": "`T`",
"optional": false,
"defaultValue": "",
"description": "the result of the create operation",
"expandable": false,
"children": []
}
]} />
___
### withTransaction
#### withTransaction
`**withTransaction**(transactionManager?): [DiscountService](DiscountService.mdx)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -1342,7 +1340,7 @@ ___
}
]} />
#### Returns
##### Returns
[DiscountService](DiscountService.mdx)
@@ -10,7 +10,7 @@ A draft order is created by an admin without direct involvement of the customer.
## Constructors
### constructor
#### constructor
`**new DraftOrder**()`
@@ -149,11 +149,11 @@ A draft order is created by an admin without direct involvement of the customer.
## Methods
### beforeInsert
#### beforeInsert
`Private **beforeInsert**(): Promise&#60;void&#62;`
#### Returns
##### Returns
Promise&#60;void&#62;
@@ -12,11 +12,11 @@ Handles draft orders
## Constructors
### constructor
#### constructor
`**new DraftOrderService**(«destructured»)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -190,29 +190,13 @@ Handles draft orders
## Accessors
### activeManager\_
#### activeManager\_
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
`Protected` **activeManager\_**: [object Object]
## Methods
### atomicPhase\_
#### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -220,6 +204,8 @@ 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",
@@ -241,7 +227,7 @@ transaction manager is created.
}
]} />
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -273,7 +259,7 @@ transaction manager is created.
}
]} />
#### Returns
##### Returns
Promise&#60;TResult&#62;
@@ -291,13 +277,13 @@ Promise&#60;TResult&#62;
___
### create
#### create
`**create**(data): Promise&#60;[DraftOrder](DraftOrder.mdx)&#62;`
Creates a draft order.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -311,7 +297,7 @@ Creates a draft order.
}
]} />
#### Returns
##### Returns
Promise&#60;[DraftOrder](DraftOrder.mdx)&#62;
@@ -329,13 +315,13 @@ Promise&#60;[DraftOrder](DraftOrder.mdx)&#62;
___
### delete
#### delete
`**delete**(draftOrderId): Promise&#60;undefined \| [DraftOrder](DraftOrder.mdx)&#62;`
Deletes draft order idempotently.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -349,7 +335,7 @@ Deletes draft order idempotently.
}
]} />
#### Returns
##### Returns
Promise&#60;undefined \| [DraftOrder](DraftOrder.mdx)&#62;
@@ -367,13 +353,13 @@ Promise&#60;undefined \| [DraftOrder](DraftOrder.mdx)&#62;
___
### list
#### list
`**list**(selector, config?): Promise&#60;[DraftOrder](DraftOrder.mdx)[]&#62;`
Lists draft orders
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -396,7 +382,7 @@ Lists draft orders
}
]} />
#### Returns
##### Returns
Promise&#60;[DraftOrder](DraftOrder.mdx)[]&#62;
@@ -414,13 +400,13 @@ Promise&#60;[DraftOrder](DraftOrder.mdx)[]&#62;
___
### listAndCount
#### listAndCount
`**listAndCount**(selector, config?): Promise&#60;[[DraftOrder](DraftOrder.mdx)[], number]&#62;`
Lists draft orders alongside the count
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -443,7 +429,7 @@ Lists draft orders alongside the count
}
]} />
#### Returns
##### Returns
Promise&#60;[[DraftOrder](DraftOrder.mdx)[], number]&#62;
@@ -461,13 +447,13 @@ Promise&#60;[[DraftOrder](DraftOrder.mdx)[], number]&#62;
___
### registerCartCompletion
#### registerCartCompletion
`**registerCartCompletion**(draftOrderId, orderId): Promise&#60;UpdateResult&#62;`
Registers a draft order as completed, when an order has been completed.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -490,7 +476,7 @@ Registers a draft order as completed, when an order has been completed.
}
]} />
#### Returns
##### Returns
Promise&#60;UpdateResult&#62;
@@ -508,13 +494,13 @@ Promise&#60;UpdateResult&#62;
___
### retrieve
#### retrieve
`**retrieve**(draftOrderId, config?): Promise&#60;[DraftOrder](DraftOrder.mdx)&#62;`
Retrieves a draft order with the given id.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -537,7 +523,7 @@ Retrieves a draft order with the given id.
}
]} />
#### Returns
##### Returns
Promise&#60;[DraftOrder](DraftOrder.mdx)&#62;
@@ -555,13 +541,13 @@ Promise&#60;[DraftOrder](DraftOrder.mdx)&#62;
___
### retrieveByCartId
#### retrieveByCartId
`**retrieveByCartId**(cartId, config?): Promise&#60;[DraftOrder](DraftOrder.mdx)&#62;`
Retrieves a draft order based on its associated cart id
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -584,7 +570,7 @@ Retrieves a draft order based on its associated cart id
}
]} />
#### Returns
##### Returns
Promise&#60;[DraftOrder](DraftOrder.mdx)&#62;
@@ -602,11 +588,11 @@ Promise&#60;[DraftOrder](DraftOrder.mdx)&#62;
___
### shouldRetryTransaction\_
#### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -620,7 +606,7 @@ ___
}
]} />
#### Returns
##### Returns
`boolean`
@@ -638,13 +624,13 @@ ___
___
### update
#### update
`**update**(id, data): Promise&#60;[DraftOrder](DraftOrder.mdx)&#62;`
Updates a draft order with the given data
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -676,7 +662,7 @@ Updates a draft order with the given data
}
]} />
#### Returns
##### Returns
Promise&#60;[DraftOrder](DraftOrder.mdx)&#62;
@@ -694,11 +680,11 @@ Promise&#60;[DraftOrder](DraftOrder.mdx)&#62;
___
### withTransaction
#### withTransaction
`**withTransaction**(transactionManager?): [DraftOrderService](DraftOrderService.mdx)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -712,7 +698,7 @@ ___
}
]} />
#### Returns
##### Returns
[DraftOrderService](DraftOrderService.mdx)
@@ -15,11 +15,11 @@ subscribers when events happen. Events will run asynchronously.
## Constructors
### constructor
#### constructor
`**new EventBusService**(«destructured», config, isSingleton?)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -148,51 +148,19 @@ subscribers when events happen. Events will run asynchronously.
## Accessors
### activeManager\_
#### activeManager\_
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
`Protected` **activeManager\_**: [object Object]
___
### eventBusModuleService\_
#### eventBusModuleService\_
`Protected get**eventBusModuleService_**(): [IEventBusModuleService](../interfaces/IEventBusModuleService.mdx)`
#### Returns
[IEventBusModuleService](../interfaces/IEventBusModuleService.mdx)
<ParameterTypes parameters={[
{
"name": "IEventBusModuleService",
"type": "[IEventBusModuleService](../interfaces/IEventBusModuleService.mdx)",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
`Protected` **eventBusModuleService\_**: [object Object]
## Methods
### atomicPhase\_
#### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -200,6 +168,8 @@ 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",
@@ -221,7 +191,7 @@ transaction manager is created.
}
]} />
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -253,7 +223,7 @@ transaction manager is created.
}
]} />
#### Returns
##### Returns
Promise&#60;TResult&#62;
@@ -271,12 +241,14 @@ Promise&#60;TResult&#62;
___
### emit
#### emit
`**emit**<TypeParameter T>(data): Promise&#60;void \| [StagedJob](StagedJob.mdx)[]&#62;`
Calls all subscribers when an event occurs.
##### Type Parameters
<ParameterTypes parameters={[
{
"name": "T",
@@ -289,7 +261,7 @@ Calls all subscribers when an event occurs.
}
]} />
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -303,7 +275,7 @@ Calls all subscribers when an event occurs.
}
]} />
#### Returns
##### Returns
Promise&#60;void \| [StagedJob](StagedJob.mdx)[]&#62;
@@ -323,6 +295,8 @@ Promise&#60;void \| [StagedJob](StagedJob.mdx)[]&#62;
Calls all subscribers when an event occurs.
##### Type Parameters
<ParameterTypes parameters={[
{
"name": "T",
@@ -335,7 +309,7 @@ Calls all subscribers when an event occurs.
}
]} />
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -367,7 +341,7 @@ Calls all subscribers when an event occurs.
}
]} />
#### Returns
##### Returns
Promise&#60;void \| [StagedJob](StagedJob.mdx)&#62;
@@ -385,11 +359,11 @@ Promise&#60;void \| [StagedJob](StagedJob.mdx)&#62;
___
### enqueuer\_
#### enqueuer\_
`**enqueuer_**(): Promise&#60;void&#62;`
#### Returns
##### Returns
Promise&#60;void&#62;
@@ -407,11 +381,11 @@ Promise&#60;void&#62;
___
### listJobs
#### listJobs
`Protected **listJobs**(listConfig): Promise&#60;never[] \| [StagedJob](StagedJob.mdx)[]&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -425,7 +399,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;never[] \| [StagedJob](StagedJob.mdx)[]&#62;
@@ -443,11 +417,11 @@ Promise&#60;never[] \| [StagedJob](StagedJob.mdx)[]&#62;
___
### shouldRetryTransaction\_
#### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -461,7 +435,7 @@ ___
}
]} />
#### Returns
##### Returns
`boolean`
@@ -479,11 +453,11 @@ ___
___
### startEnqueuer
#### startEnqueuer
`**startEnqueuer**(): void`
#### Returns
##### Returns
`void`
@@ -501,11 +475,11 @@ ___
___
### stopEnqueuer
#### stopEnqueuer
`**stopEnqueuer**(): Promise&#60;void&#62;`
#### Returns
##### Returns
Promise&#60;void&#62;
@@ -523,13 +497,13 @@ Promise&#60;void&#62;
___
### subscribe
#### subscribe
`**subscribe**(event, subscriber, context?): [EventBusService](EventBusService.mdx)`
Adds a function to a list of event subscribers.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -561,7 +535,7 @@ Adds a function to a list of event subscribers.
}
]} />
#### Returns
##### Returns
[EventBusService](EventBusService.mdx)
@@ -579,13 +553,13 @@ Adds a function to a list of event subscribers.
___
### unsubscribe
#### unsubscribe
`**unsubscribe**(event, subscriber, context): [EventBusService](EventBusService.mdx)`
Removes function from the list of event subscribers.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -617,7 +591,7 @@ Removes function from the list of event subscribers.
}
]} />
#### Returns
##### Returns
[EventBusService](EventBusService.mdx)
@@ -635,11 +609,11 @@ Removes function from the list of event subscribers.
___
### withTransaction
#### withTransaction
`**withTransaction**(transactionManager?): [EventBusService](EventBusService.mdx)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -653,7 +627,7 @@ ___
}
]} />
#### Returns
##### Returns
[EventBusService](EventBusService.mdx)
@@ -8,7 +8,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Constructors
### constructor
#### constructor
`**new FilterableBatchJobProps**()`
@@ -8,7 +8,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Constructors
### constructor
#### constructor
`**new FilterableCartProps**()`
@@ -8,7 +8,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Constructors
### constructor
#### constructor
`**new FilterableDiscountProps**()`
@@ -8,7 +8,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Constructors
### constructor
#### constructor
`**new FilterableLineItemAdjustmentProps**()`
@@ -10,7 +10,7 @@ Filters to apply on the retrieved price lists.
## Constructors
### constructor
#### constructor
`**new FilterablePriceListProps**()`
@@ -10,7 +10,7 @@ Filters to apply on retrieved products.
## Constructors
### constructor
#### constructor
`**new FilterableProductProps**()`
@@ -8,7 +8,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Constructors
### constructor
#### constructor
`**new FilterableProductVariantProps**()`
@@ -12,11 +12,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Constructors
### constructor
#### constructor
`**new FlagRouter**(flags)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -46,7 +46,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Methods
### isFeatureEnabled
#### isFeatureEnabled
`**isFeatureEnabled**(flag): boolean`
@@ -58,7 +58,7 @@ We use 1. for top-level feature flags and 2. for nested feature flags. Almost al
An example of a nested flag is workflows. To use it, you would do:
`isFeatureEnabled({ workflows: Workflows.CreateCart })`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -72,7 +72,7 @@ An example of a nested flag is workflows. To use it, you would do:
}
]} />
#### Returns
##### Returns
`boolean`
@@ -90,11 +90,11 @@ An example of a nested flag is workflows. To use it, you would do:
___
### listFlags
#### listFlags
`**listFlags**(): [FeatureFlagsResponse](../types/FeatureFlagsResponse.mdx)`
#### Returns
##### Returns
[FeatureFlagsResponse](../types/FeatureFlagsResponse.mdx)
@@ -112,7 +112,7 @@ ___
___
### setFlag
#### setFlag
`**setFlag**(key, value): void`
@@ -122,7 +122,7 @@ Flags take two shapes:
`setFlag("myFeatureFlag", { nestedFlag: true })`
These shapes are used for top-level and nested flags respectively, as explained in isFeatureEnabled.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -145,7 +145,7 @@ These shapes are used for top-level and nested flags respectively, as explained
}
]} />
#### Returns
##### Returns
`void`
@@ -10,7 +10,7 @@ A Fulfillment is created once an admin can prepare the purchased goods. Fulfillm
## Constructors
### constructor
#### constructor
`**new Fulfillment**()`
@@ -212,11 +212,11 @@ A Fulfillment is created once an admin can prepare the purchased goods. Fulfillm
## Methods
### beforeInsert
#### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
##### Returns
`void`
@@ -10,7 +10,7 @@ This represents the association between a Line Item and a Fulfillment.
## Constructors
### constructor
#### constructor
`**new FulfillmentItem**()`
@@ -10,7 +10,7 @@ A fulfillment provider represents a fulfillment service installed in the Medusa
## Constructors
### constructor
#### constructor
`**new FulfillmentProvider**()`
@@ -10,11 +10,11 @@ Helps retrieve fulfillment providers
## Constructors
### constructor
#### constructor
`**new FulfillmentProviderService**(container)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -98,29 +98,13 @@ Helps retrieve fulfillment providers
## Accessors
### activeManager\_
#### activeManager\_
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
`Protected` **activeManager\_**: [object Object]
## Methods
### atomicPhase\_
#### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -128,6 +112,8 @@ 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",
@@ -149,7 +135,7 @@ transaction manager is created.
}
]} />
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -181,7 +167,7 @@ transaction manager is created.
}
]} />
#### Returns
##### Returns
Promise&#60;TResult&#62;
@@ -199,11 +185,11 @@ Promise&#60;TResult&#62;
___
### calculatePrice
#### calculatePrice
`**calculatePrice**(option, data, cart?): Promise&#60;number&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -235,7 +221,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;number&#62;
@@ -253,11 +239,11 @@ Promise&#60;number&#62;
___
### canCalculate
#### canCalculate
`**canCalculate**(option): Promise&#60;boolean&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -271,7 +257,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;boolean&#62;
@@ -289,11 +275,11 @@ Promise&#60;boolean&#62;
___
### cancelFulfillment
#### cancelFulfillment
`**cancelFulfillment**(fulfillment): Promise&#60;[Fulfillment](Fulfillment.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -307,7 +293,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[Fulfillment](Fulfillment.mdx)&#62;
@@ -325,11 +311,11 @@ Promise&#60;[Fulfillment](Fulfillment.mdx)&#62;
___
### createFulfillment
#### createFulfillment
`**createFulfillment**(method, items, order, fulfillment): Promise&#60;Record&#60;string, unknown&#62;&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -370,7 +356,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;Record&#60;string, unknown&#62;&#62;
@@ -388,11 +374,11 @@ Promise&#60;Record&#60;string, unknown&#62;&#62;
___
### createReturn
#### createReturn
`**createReturn**(returnOrder): Promise&#60;Record&#60;string, unknown&#62;&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -406,7 +392,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;Record&#60;string, unknown&#62;&#62;
@@ -424,11 +410,11 @@ Promise&#60;Record&#60;string, unknown&#62;&#62;
___
### list
#### list
`**list**(): Promise&#60;[FulfillmentProvider](FulfillmentProvider.mdx)[]&#62;`
#### Returns
##### Returns
Promise&#60;[FulfillmentProvider](FulfillmentProvider.mdx)[]&#62;
@@ -446,11 +432,11 @@ Promise&#60;[FulfillmentProvider](FulfillmentProvider.mdx)[]&#62;
___
### listFulfillmentOptions
#### listFulfillmentOptions
`**listFulfillmentOptions**(providerIds): Promise&#60;[FulfillmentOptions](../types/FulfillmentOptions.mdx)[]&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -464,7 +450,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[FulfillmentOptions](../types/FulfillmentOptions.mdx)[]&#62;
@@ -482,11 +468,11 @@ Promise&#60;[FulfillmentOptions](../types/FulfillmentOptions.mdx)[]&#62;
___
### registerInstalledProviders
#### registerInstalledProviders
`**registerInstalledProviders**(providers): Promise&#60;void&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -500,7 +486,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;void&#62;
@@ -518,13 +504,13 @@ Promise&#60;void&#62;
___
### retrieveDocuments
#### retrieveDocuments
`**retrieveDocuments**(providerId, fulfillmentData, documentType): Promise&#60;any&#62;`
Fetches documents from the fulfillment provider
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -556,7 +542,7 @@ Fetches documents from the fulfillment provider
}
]} />
#### Returns
##### Returns
Promise&#60;any&#62;
@@ -574,11 +560,11 @@ Promise&#60;any&#62;
___
### retrieveProvider
#### retrieveProvider
`**retrieveProvider**(providerId): any`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -592,7 +578,7 @@ ___
}
]} />
#### Returns
##### Returns
`any`
@@ -610,11 +596,11 @@ ___
___
### shouldRetryTransaction\_
#### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -628,7 +614,7 @@ ___
}
]} />
#### Returns
##### Returns
`boolean`
@@ -646,11 +632,11 @@ ___
___
### validateFulfillmentData
#### validateFulfillmentData
`**validateFulfillmentData**(option, data, cart): Promise&#60;Record&#60;string, unknown&#62;&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -682,7 +668,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;Record&#60;string, unknown&#62;&#62;
@@ -700,11 +686,11 @@ Promise&#60;Record&#60;string, unknown&#62;&#62;
___
### validateOption
#### validateOption
`**validateOption**(option): Promise&#60;boolean&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -718,7 +704,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;boolean&#62;
@@ -736,11 +722,11 @@ Promise&#60;boolean&#62;
___
### withTransaction
#### withTransaction
`**withTransaction**(transactionManager?): [FulfillmentProviderService](FulfillmentProviderService.mdx)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -754,7 +740,7 @@ ___
}
]} />
#### Returns
##### Returns
[FulfillmentProviderService](FulfillmentProviderService.mdx)
@@ -10,11 +10,11 @@ Handles Fulfillments
## Constructors
### constructor
#### constructor
`**new FulfillmentService**(«destructured»)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -152,29 +152,13 @@ Handles Fulfillments
## Accessors
### activeManager\_
#### activeManager\_
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
`Protected` **activeManager\_**: [object Object]
## Methods
### atomicPhase\_
#### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -182,6 +166,8 @@ 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",
@@ -203,7 +189,7 @@ transaction manager is created.
}
]} />
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -235,7 +221,7 @@ transaction manager is created.
}
]} />
#### Returns
##### Returns
Promise&#60;TResult&#62;
@@ -253,7 +239,7 @@ Promise&#60;TResult&#62;
___
### cancelFulfillment
#### cancelFulfillment
`**cancelFulfillment**(fulfillmentOrId): Promise&#60;[Fulfillment](Fulfillment.mdx)&#62;`
@@ -261,7 +247,7 @@ Cancels a fulfillment with the fulfillment provider. Will decrement the
fulfillment\_quantity on the line items associated with the fulfillment.
Throws if the fulfillment has already been shipped.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -275,7 +261,7 @@ Throws if the fulfillment has already been shipped.
}
]} />
#### Returns
##### Returns
Promise&#60;[Fulfillment](Fulfillment.mdx)&#62;
@@ -293,7 +279,7 @@ Promise&#60;[Fulfillment](Fulfillment.mdx)&#62;
___
### createFulfillment
#### createFulfillment
`**createFulfillment**(order, itemsToFulfill, custom?): Promise&#60;[Fulfillment](Fulfillment.mdx)[]&#62;`
@@ -302,7 +288,7 @@ If items needs to be fulfilled by different provider, we make
sure to partition those items, and create fulfillment for
those partitions.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -334,7 +320,7 @@ those partitions.
}
]} />
#### Returns
##### Returns
Promise&#60;[Fulfillment](Fulfillment.mdx)[]&#62;
@@ -352,14 +338,14 @@ Promise&#60;[Fulfillment](Fulfillment.mdx)[]&#62;
___
### createShipment
#### createShipment
`**createShipment**(fulfillmentId, trackingLinks?, config?): Promise&#60;[Fulfillment](Fulfillment.mdx)&#62;`
Creates a shipment by marking a fulfillment as shipped. Adds
tracking links and potentially more metadata.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -391,7 +377,7 @@ tracking links and potentially more metadata.
}
]} />
#### Returns
##### Returns
Promise&#60;[Fulfillment](Fulfillment.mdx)&#62;
@@ -409,13 +395,13 @@ Promise&#60;[Fulfillment](Fulfillment.mdx)&#62;
___
### getFulfillmentItems\_
#### getFulfillmentItems\_
`**getFulfillmentItems_**(order, items): Promise&#60;(null \| [LineItem](LineItem.mdx))[]&#62;`
Retrieves the order line items, given an array of items.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -438,7 +424,7 @@ Retrieves the order line items, given an array of items.
}
]} />
#### Returns
##### Returns
Promise&#60;(null \| [LineItem](LineItem.mdx))[]&#62;
@@ -456,11 +442,11 @@ Promise&#60;(null \| [LineItem](LineItem.mdx))[]&#62;
___
### partitionItems\_
#### partitionItems\_
`**partitionItems_**(shippingMethods, items): [FulfillmentItemPartition](../types/FulfillmentItemPartition.mdx)[]`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -483,7 +469,7 @@ ___
}
]} />
#### Returns
##### Returns
[FulfillmentItemPartition](../types/FulfillmentItemPartition.mdx)[]
@@ -501,13 +487,13 @@ ___
___
### retrieve
#### retrieve
`**retrieve**(fulfillmentId, config?): Promise&#60;[Fulfillment](Fulfillment.mdx)&#62;`
Retrieves a fulfillment by its id.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -530,7 +516,7 @@ Retrieves a fulfillment by its id.
}
]} />
#### Returns
##### Returns
Promise&#60;[Fulfillment](Fulfillment.mdx)&#62;
@@ -548,11 +534,11 @@ Promise&#60;[Fulfillment](Fulfillment.mdx)&#62;
___
### shouldRetryTransaction\_
#### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -566,7 +552,7 @@ ___
}
]} />
#### Returns
##### Returns
`boolean`
@@ -584,7 +570,7 @@ ___
___
### validateFulfillmentLineItem\_
#### validateFulfillmentLineItem\_
`**validateFulfillmentLineItem_**(item, quantity): null \| [LineItem](LineItem.mdx)`
@@ -593,7 +579,7 @@ fulfillable quantity is lower than the requested fulfillment quantity.
Fulfillable quantity is calculated by subtracting the already fulfilled
quantity from the quantity that was originally purchased.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -616,7 +602,7 @@ quantity from the quantity that was originally purchased.
}
]} />
#### Returns
##### Returns
`null` \| [LineItem](LineItem.mdx)
@@ -634,11 +620,11 @@ quantity from the quantity that was originally purchased.
___
### withTransaction
#### withTransaction
`**withTransaction**(transactionManager?): [FulfillmentService](FulfillmentService.mdx)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -652,7 +638,7 @@ ___
}
]} />
#### Returns
##### Returns
[FulfillmentService](FulfillmentService.mdx)
@@ -10,7 +10,7 @@ Gift Cards are redeemable and represent a value that can be used towards the pay
## Constructors
### constructor
#### constructor
`**new GiftCard**()`
@@ -10,7 +10,7 @@ Gift Cards are redeemable and represent a value that can be used towards the pay
## Constructors
### constructor
#### constructor
`**new GiftCard**()`
@@ -158,11 +158,11 @@ Gift Cards are redeemable and represent a value that can be used towards the pay
## Methods
### beforeInsert
#### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
##### Returns
`void`
@@ -10,11 +10,11 @@ Provides layer to manipulate gift cards.
## Constructors
### constructor
#### constructor
`**new GiftCardService**(«destructured»)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -134,29 +134,13 @@ Provides layer to manipulate gift cards.
## Accessors
### activeManager\_
#### activeManager\_
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
`Protected` **activeManager\_**: [object Object]
## Methods
### atomicPhase\_
#### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -164,6 +148,8 @@ 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",
@@ -185,7 +171,7 @@ transaction manager is created.
}
]} />
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -217,7 +203,7 @@ transaction manager is created.
}
]} />
#### Returns
##### Returns
Promise&#60;TResult&#62;
@@ -235,13 +221,13 @@ Promise&#60;TResult&#62;
___
### create
#### create
`**create**(giftCard): Promise&#60;[GiftCard](GiftCard.mdx)&#62;`
Creates a gift card with provided data given that the data is validated.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -255,7 +241,7 @@ Creates a gift card with provided data given that the data is validated.
}
]} />
#### Returns
##### Returns
Promise&#60;[GiftCard](GiftCard.mdx)&#62;
@@ -273,11 +259,11 @@ Promise&#60;[GiftCard](GiftCard.mdx)&#62;
___
### createTransaction
#### createTransaction
`**createTransaction**(data): Promise&#60;string&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -291,7 +277,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;string&#62;
@@ -309,13 +295,13 @@ Promise&#60;string&#62;
___
### delete
#### delete
`**delete**(giftCardId): Promise&#60;void \| [GiftCard](GiftCard.mdx)&#62;`
Deletes a gift card idempotently
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -329,7 +315,7 @@ Deletes a gift card idempotently
}
]} />
#### Returns
##### Returns
Promise&#60;void \| [GiftCard](GiftCard.mdx)&#62;
@@ -347,11 +333,11 @@ Promise&#60;void \| [GiftCard](GiftCard.mdx)&#62;
___
### list
#### list
`**list**(selector?, config?): Promise&#60;[GiftCard](GiftCard.mdx)[]&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -374,7 +360,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[GiftCard](GiftCard.mdx)[]&#62;
@@ -392,11 +378,11 @@ Promise&#60;[GiftCard](GiftCard.mdx)[]&#62;
___
### listAndCount
#### listAndCount
`**listAndCount**(selector?, config?): Promise&#60;[[GiftCard](GiftCard.mdx)[], number]&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -419,7 +405,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[[GiftCard](GiftCard.mdx)[], number]&#62;
@@ -437,13 +423,13 @@ Promise&#60;[[GiftCard](GiftCard.mdx)[], number]&#62;
___
### retrieve
#### retrieve
`**retrieve**(giftCardId, config?): Promise&#60;[GiftCard](GiftCard.mdx)&#62;`
Gets a gift card by id.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -466,7 +452,7 @@ Gets a gift card by id.
}
]} />
#### Returns
##### Returns
Promise&#60;[GiftCard](GiftCard.mdx)&#62;
@@ -484,11 +470,11 @@ Promise&#60;[GiftCard](GiftCard.mdx)&#62;
___
### retrieveByCode
#### retrieveByCode
`**retrieveByCode**(code, config?): Promise&#60;[GiftCard](GiftCard.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -511,7 +497,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[GiftCard](GiftCard.mdx)&#62;
@@ -529,11 +515,11 @@ Promise&#60;[GiftCard](GiftCard.mdx)&#62;
___
### retrieve\_
#### retrieve\_
`Protected **retrieve_**(selector, config?): Promise&#60;[GiftCard](GiftCard.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -556,7 +542,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[GiftCard](GiftCard.mdx)&#62;
@@ -574,11 +560,11 @@ Promise&#60;[GiftCard](GiftCard.mdx)&#62;
___
### shouldRetryTransaction\_
#### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -592,7 +578,7 @@ ___
}
]} />
#### Returns
##### Returns
`boolean`
@@ -610,13 +596,13 @@ ___
___
### update
#### update
`**update**(giftCardId, update): Promise&#60;[GiftCard](GiftCard.mdx)&#62;`
Updates a giftCard.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -639,7 +625,7 @@ Updates a giftCard.
}
]} />
#### Returns
##### Returns
Promise&#60;[GiftCard](GiftCard.mdx)&#62;
@@ -657,11 +643,11 @@ Promise&#60;[GiftCard](GiftCard.mdx)&#62;
___
### withTransaction
#### withTransaction
`**withTransaction**(transactionManager?): [GiftCardService](GiftCardService.mdx)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -675,7 +661,7 @@ ___
}
]} />
#### Returns
##### Returns
[GiftCardService](GiftCardService.mdx)
@@ -693,13 +679,13 @@ ___
___
### generateCode
#### generateCode
`Static **generateCode**(): string`
Generates a 16 character gift card code
#### Returns
##### Returns
`string`
@@ -717,14 +703,14 @@ Generates a 16 character gift card code
___
### resolveTaxRate
#### resolveTaxRate
`Static Protected **resolveTaxRate**(giftCardTaxRate, region): null \| number`
The tax\_rate of the giftcard can depend on whether regions tax gift cards, an input
provided by the user or the tax rate. Based on these conditions, tax\_rate changes.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -747,7 +733,7 @@ provided by the user or the tax rate. Based on these conditions, tax\_rate chang
}
]} />
#### Returns
##### Returns
`null` \| `number`
@@ -10,7 +10,7 @@ Gift Card Transactions are created once a Customer uses a Gift Card to pay for t
## Constructors
### constructor
#### constructor
`**new GiftCardTransaction**()`
@@ -104,11 +104,11 @@ Gift Card Transactions are created once a Customer uses a Gift Card to pay for t
## Methods
### beforeInsert
#### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
##### Returns
`void`
@@ -10,7 +10,7 @@ Idempotency Key is used to continue a process in case of any failure that might
## Constructors
### constructor
#### constructor
`**new IdempotencyKey**()`
@@ -113,11 +113,11 @@ Idempotency Key is used to continue a process in case of any failure that might
## Methods
### beforeInsert
#### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
##### Returns
`void`
@@ -8,11 +8,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Constructors
### constructor
#### constructor
`**new IdempotencyKeyService**(«destructured»)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -87,29 +87,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Accessors
### activeManager\_
#### activeManager\_
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
`Protected` **activeManager\_**: [object Object]
## Methods
### atomicPhase\_
#### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -117,6 +101,8 @@ 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",
@@ -138,7 +124,7 @@ transaction manager is created.
}
]} />
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -170,7 +156,7 @@ transaction manager is created.
}
]} />
#### Returns
##### Returns
Promise&#60;TResult&#62;
@@ -188,7 +174,7 @@ Promise&#60;TResult&#62;
___
### create
#### create
`**create**(payload): Promise&#60;[IdempotencyKey](IdempotencyKey.mdx)&#62;`
@@ -196,7 +182,7 @@ Creates an idempotency key for a request.
If no idempotency key is provided in request, we will create a unique
identifier.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -210,7 +196,7 @@ identifier.
}
]} />
#### Returns
##### Returns
Promise&#60;[IdempotencyKey](IdempotencyKey.mdx)&#62;
@@ -228,13 +214,13 @@ Promise&#60;[IdempotencyKey](IdempotencyKey.mdx)&#62;
___
### initializeRequest
#### initializeRequest
`**initializeRequest**(headerKey, reqMethod, reqParams, reqPath): Promise&#60;[IdempotencyKey](IdempotencyKey.mdx)&#62;`
Execute the initial steps in a idempotent request.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -275,7 +261,7 @@ Execute the initial steps in a idempotent request.
}
]} />
#### Returns
##### Returns
Promise&#60;[IdempotencyKey](IdempotencyKey.mdx)&#62;
@@ -293,13 +279,13 @@ Promise&#60;[IdempotencyKey](IdempotencyKey.mdx)&#62;
___
### lock
#### lock
`**lock**(idempotencyKey): Promise&#60;[IdempotencyKey](IdempotencyKey.mdx)&#62;`
Locks an idempotency.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -313,7 +299,7 @@ Locks an idempotency.
}
]} />
#### Returns
##### Returns
Promise&#60;[IdempotencyKey](IdempotencyKey.mdx)&#62;
@@ -331,13 +317,13 @@ Promise&#60;[IdempotencyKey](IdempotencyKey.mdx)&#62;
___
### retrieve
#### retrieve
`**retrieve**(idempotencyKeyOrSelector): Promise&#60;[IdempotencyKey](IdempotencyKey.mdx)&#62;`
Retrieves an idempotency key
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -351,7 +337,7 @@ Retrieves an idempotency key
}
]} />
#### Returns
##### Returns
Promise&#60;[IdempotencyKey](IdempotencyKey.mdx)&#62;
@@ -369,11 +355,11 @@ Promise&#60;[IdempotencyKey](IdempotencyKey.mdx)&#62;
___
### shouldRetryTransaction\_
#### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -387,7 +373,7 @@ ___
}
]} />
#### Returns
##### Returns
`boolean`
@@ -405,13 +391,13 @@ ___
___
### update
#### update
`**update**(idempotencyKey, update): Promise&#60;[IdempotencyKey](IdempotencyKey.mdx)&#62;`
Locks an idempotency.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -434,7 +420,7 @@ Locks an idempotency.
}
]} />
#### Returns
##### Returns
Promise&#60;[IdempotencyKey](IdempotencyKey.mdx)&#62;
@@ -452,11 +438,11 @@ Promise&#60;[IdempotencyKey](IdempotencyKey.mdx)&#62;
___
### withTransaction
#### withTransaction
`**withTransaction**(transactionManager?): [IdempotencyKeyService](IdempotencyKeyService.mdx)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -470,7 +456,7 @@ ___
}
]} />
#### Returns
##### Returns
[IdempotencyKeyService](IdempotencyKeyService.mdx)
@@ -488,7 +474,7 @@ ___
___
### workStage
#### workStage
`**workStage**(idempotencyKey, callback): Promise&#60;[IdempotencyKey](IdempotencyKey.mdx)&#62;`
@@ -498,7 +484,7 @@ transactionally executed in isolation. An idempotent request will
always consist of 2 or more of these phases. The required phases are
"started" and "finished".
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -521,7 +507,7 @@ always consist of 2 or more of these phases. The required phases are
}
]} />
#### Returns
##### Returns
Promise&#60;[IdempotencyKey](IdempotencyKey.mdx)&#62;
@@ -10,7 +10,7 @@ An Image is used to store details about uploaded images. Images are uploaded by
## Constructors
### constructor
#### constructor
`**new Image**()`
@@ -77,11 +77,11 @@ An Image is used to store details about uploaded images. Images are uploaded by
## Methods
### beforeInsert
#### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
##### Returns
`void`
@@ -10,7 +10,7 @@ Line Items are created when a product is added to a Cart. When Line Items are pu
## Constructors
### constructor
#### constructor
`**new LineItem**()`
@@ -411,11 +411,11 @@ Line Items are created when a product is added to a Cart. When Line Items are pu
## Methods
### afterUpdateOrLoad
#### afterUpdateOrLoad
`**afterUpdateOrLoad**(): void`
#### Returns
##### Returns
`void`
@@ -433,11 +433,11 @@ Line Items are created when a product is added to a Cart. When Line Items are pu
___
### beforeInsert
#### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
##### Returns
`void`
@@ -455,11 +455,11 @@ ___
___
### beforeUpdate
#### beforeUpdate
`**beforeUpdate**(): void`
#### Returns
##### Returns
`void`
@@ -10,7 +10,7 @@ A Line Item Adjustment includes details on discounts applied on a line item.
## Constructors
### constructor
#### constructor
`**new LineItemAdjustment**()`
@@ -95,11 +95,11 @@ A Line Item Adjustment includes details on discounts applied on a line item.
## Methods
### beforeInsert
#### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
##### Returns
`void`
@@ -10,11 +10,11 @@ Provides layer to manipulate line item adjustments.
## Constructors
### constructor
#### constructor
`**new LineItemAdjustmentService**(«destructured»)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -98,29 +98,13 @@ Provides layer to manipulate line item adjustments.
## Accessors
### activeManager\_
#### activeManager\_
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
`Protected` **activeManager\_**: [object Object]
## Methods
### atomicPhase\_
#### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -128,6 +112,8 @@ 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",
@@ -149,7 +135,7 @@ transaction manager is created.
}
]} />
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -181,7 +167,7 @@ transaction manager is created.
}
]} />
#### Returns
##### Returns
Promise&#60;TResult&#62;
@@ -199,13 +185,13 @@ Promise&#60;TResult&#62;
___
### create
#### create
`**create**(data): Promise&#60;[LineItemAdjustment](LineItemAdjustment.mdx)&#62;`
Creates a line item adjustment
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -219,7 +205,7 @@ Creates a line item adjustment
}
]} />
#### Returns
##### Returns
Promise&#60;[LineItemAdjustment](LineItemAdjustment.mdx)&#62;
@@ -237,13 +223,13 @@ Promise&#60;[LineItemAdjustment](LineItemAdjustment.mdx)&#62;
___
### createAdjustmentForLineItem
#### createAdjustmentForLineItem
`**createAdjustmentForLineItem**(cart, lineItem): Promise&#60;[LineItemAdjustment](LineItemAdjustment.mdx)[]&#62;`
Creates adjustment for a line item
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -266,7 +252,7 @@ Creates adjustment for a line item
}
]} />
#### Returns
##### Returns
Promise&#60;[LineItemAdjustment](LineItemAdjustment.mdx)[]&#62;
@@ -284,13 +270,13 @@ Promise&#60;[LineItemAdjustment](LineItemAdjustment.mdx)[]&#62;
___
### createAdjustments
#### createAdjustments
`**createAdjustments**(cart, lineItem?): Promise&#60;[LineItemAdjustment](LineItemAdjustment.mdx)[] \| [LineItemAdjustment](LineItemAdjustment.mdx)[][]&#62;`
Creates adjustment for a line item
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -313,7 +299,7 @@ Creates adjustment for a line item
}
]} />
#### Returns
##### Returns
Promise&#60;[LineItemAdjustment](LineItemAdjustment.mdx)[] \| [LineItemAdjustment](LineItemAdjustment.mdx)[][]&#62;
@@ -331,13 +317,13 @@ Promise&#60;[LineItemAdjustment](LineItemAdjustment.mdx)[] \| [LineItemAdjustmen
___
### delete
#### delete
`**delete**(selectorOrIds): Promise&#60;void&#62;`
Deletes line item adjustments matching a selector
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -351,7 +337,7 @@ Deletes line item adjustments matching a selector
}
]} />
#### Returns
##### Returns
Promise&#60;void&#62;
@@ -369,13 +355,13 @@ Promise&#60;void&#62;
___
### generateAdjustments
#### generateAdjustments
`**generateAdjustments**(calculationContextData, generatedLineItem, context): Promise&#60;[GeneratedAdjustment](../types/GeneratedAdjustment.mdx)[]&#62;`
Creates adjustment for a line item
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -407,7 +393,7 @@ Creates adjustment for a line item
}
]} />
#### Returns
##### Returns
Promise&#60;[GeneratedAdjustment](../types/GeneratedAdjustment.mdx)[]&#62;
@@ -425,13 +411,13 @@ Promise&#60;[GeneratedAdjustment](../types/GeneratedAdjustment.mdx)[]&#62;
___
### list
#### list
`**list**(selector?, config?): Promise&#60;[LineItemAdjustment](LineItemAdjustment.mdx)[]&#62;`
Lists line item adjustments
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -454,7 +440,7 @@ Lists line item adjustments
}
]} />
#### Returns
##### Returns
Promise&#60;[LineItemAdjustment](LineItemAdjustment.mdx)[]&#62;
@@ -472,13 +458,13 @@ Promise&#60;[LineItemAdjustment](LineItemAdjustment.mdx)[]&#62;
___
### retrieve
#### retrieve
`**retrieve**(lineItemAdjustmentId, config?): Promise&#60;[LineItemAdjustment](LineItemAdjustment.mdx)&#62;`
Retrieves a line item adjustment by id.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -501,7 +487,7 @@ Retrieves a line item adjustment by id.
}
]} />
#### Returns
##### Returns
Promise&#60;[LineItemAdjustment](LineItemAdjustment.mdx)&#62;
@@ -519,11 +505,11 @@ Promise&#60;[LineItemAdjustment](LineItemAdjustment.mdx)&#62;
___
### shouldRetryTransaction\_
#### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -537,7 +523,7 @@ ___
}
]} />
#### Returns
##### Returns
`boolean`
@@ -555,13 +541,13 @@ ___
___
### update
#### update
`**update**(id, data): Promise&#60;[LineItemAdjustment](LineItemAdjustment.mdx)&#62;`
Creates a line item adjustment
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -584,7 +570,7 @@ Creates a line item adjustment
}
]} />
#### Returns
##### Returns
Promise&#60;[LineItemAdjustment](LineItemAdjustment.mdx)&#62;
@@ -602,11 +588,11 @@ Promise&#60;[LineItemAdjustment](LineItemAdjustment.mdx)&#62;
___
### withTransaction
#### withTransaction
`**withTransaction**(transactionManager?): [LineItemAdjustmentService](LineItemAdjustmentService.mdx)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -620,7 +606,7 @@ ___
}
]} />
#### Returns
##### Returns
[LineItemAdjustmentService](LineItemAdjustmentService.mdx)
@@ -8,11 +8,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Constructors
### constructor
#### constructor
`**new LineItemService**(«destructured»)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -168,29 +168,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Accessors
### activeManager\_
#### activeManager\_
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
`Protected` **activeManager\_**: [object Object]
## Methods
### atomicPhase\_
#### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -198,6 +182,8 @@ 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",
@@ -219,7 +205,7 @@ transaction manager is created.
}
]} />
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -251,7 +237,7 @@ transaction manager is created.
}
]} />
#### Returns
##### Returns
Promise&#60;TResult&#62;
@@ -269,11 +255,11 @@ Promise&#60;TResult&#62;
___
### cloneTo
#### cloneTo
`**cloneTo**(ids, data?, options?): Promise&#60;[LineItem](LineItem.mdx)[]&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -314,7 +300,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[LineItem](LineItem.mdx)[]&#62;
@@ -332,12 +318,14 @@ Promise&#60;[LineItem](LineItem.mdx)[]&#62;
___
### create
#### create
`**create**<TypeParameter T, TypeParameter TResult>(data): Promise&#60;TResult&#62;`
Create a line item
##### Type Parameters
<ParameterTypes parameters={[
{
"name": "T",
@@ -359,7 +347,7 @@ Create a line item
}
]} />
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -373,7 +361,7 @@ Create a line item
}
]} />
#### Returns
##### Returns
Promise&#60;TResult&#62;
@@ -391,14 +379,14 @@ Promise&#60;TResult&#62;
___
### createReturnLines
#### createReturnLines
`**createReturnLines**(returnId, cartId): Promise&#60;[LineItem](LineItem.mdx)[]&#62;`
Creates return line items for a given cart based on the return items in a
return.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -421,7 +409,7 @@ return.
}
]} />
#### Returns
##### Returns
Promise&#60;[LineItem](LineItem.mdx)[]&#62;
@@ -439,13 +427,13 @@ Promise&#60;[LineItem](LineItem.mdx)[]&#62;
___
### createTaxLine
#### createTaxLine
`**createTaxLine**(args): [LineItemTaxLine](LineItemTaxLine.mdx)`
Create a line item tax line.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -459,7 +447,7 @@ Create a line item tax line.
}
]} />
#### Returns
##### Returns
[LineItemTaxLine](LineItemTaxLine.mdx)
@@ -477,13 +465,13 @@ Create a line item tax line.
___
### delete
#### delete
`**delete**(id): Promise&#60;undefined \| null \| [LineItem](LineItem.mdx)&#62;`
Deletes a line item.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -497,7 +485,7 @@ Deletes a line item.
}
]} />
#### Returns
##### Returns
Promise&#60;undefined \| null \| [LineItem](LineItem.mdx)&#62;
@@ -515,11 +503,11 @@ Promise&#60;undefined \| null \| [LineItem](LineItem.mdx)&#62;
___
### deleteWithTaxLines
#### deleteWithTaxLines
`**deleteWithTaxLines**(id): Promise&#60;undefined \| null \| [LineItem](LineItem.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -533,7 +521,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;undefined \| null \| [LineItem](LineItem.mdx)&#62;
@@ -556,12 +544,14 @@ Deletes a line item with the tax lines.
___
### generate
#### generate
`**generate**<TypeParameter T, TypeParameter TResult>(variantIdOrData, regionIdOrContext, quantity?, context?): Promise&#60;TResult&#62;`
Generate a single or multiple line item without persisting the data into the db
##### Type Parameters
<ParameterTypes parameters={[
{
"name": "T",
@@ -583,7 +573,7 @@ Generate a single or multiple line item without persisting the data into the db
}
]} />
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -624,7 +614,7 @@ Generate a single or multiple line item without persisting the data into the db
}
]} />
#### Returns
##### Returns
Promise&#60;TResult&#62;
@@ -642,11 +632,11 @@ Promise&#60;TResult&#62;
___
### generateLineItem
#### generateLineItem
`Protected **generateLineItem**(variant, quantity, context): Promise&#60;[LineItem](LineItem.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -750,7 +740,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[LineItem](LineItem.mdx)&#62;
@@ -768,11 +758,11 @@ Promise&#60;[LineItem](LineItem.mdx)&#62;
___
### list
#### list
`**list**(selector, config?): Promise&#60;[LineItem](LineItem.mdx)[]&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -795,7 +785,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[LineItem](LineItem.mdx)[]&#62;
@@ -813,13 +803,13 @@ Promise&#60;[LineItem](LineItem.mdx)[]&#62;
___
### retrieve
#### retrieve
`**retrieve**(id, config?): Promise&#60;[LineItem](LineItem.mdx)&#62;`
Retrieves a line item by its id.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -842,7 +832,7 @@ Retrieves a line item by its id.
}
]} />
#### Returns
##### Returns
Promise&#60;[LineItem](LineItem.mdx)&#62;
@@ -860,11 +850,11 @@ Promise&#60;[LineItem](LineItem.mdx)&#62;
___
### shouldRetryTransaction\_
#### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -878,7 +868,7 @@ ___
}
]} />
#### Returns
##### Returns
`boolean`
@@ -896,13 +886,13 @@ ___
___
### update
#### update
`**update**(idOrSelector, data): Promise&#60;[LineItem](LineItem.mdx)[]&#62;`
Updates a line item
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -925,7 +915,7 @@ Updates a line item
}
]} />
#### Returns
##### Returns
Promise&#60;[LineItem](LineItem.mdx)[]&#62;
@@ -943,10 +933,12 @@ Promise&#60;[LineItem](LineItem.mdx)[]&#62;
___
### validateGenerateArguments
#### validateGenerateArguments
`Protected **validateGenerateArguments**<TypeParameter T, TypeParameter TResult>(variantIdOrData, regionIdOrContext, quantity?): void`
##### Type Parameters
<ParameterTypes parameters={[
{
"name": "T",
@@ -968,7 +960,7 @@ ___
}
]} />
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -1000,7 +992,7 @@ ___
}
]} />
#### Returns
##### Returns
`void`
@@ -1018,11 +1010,11 @@ ___
___
### withTransaction
#### withTransaction
`**withTransaction**(transactionManager?): [LineItemService](LineItemService.mdx)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -1036,7 +1028,7 @@ ___
}
]} />
#### Returns
##### Returns
[LineItemService](LineItemService.mdx)
@@ -10,7 +10,7 @@ A Line Item Tax Line represents the taxes applied on a line item.
## Constructors
### constructor
#### constructor
`**new LineItemTaxLine**()`
@@ -104,11 +104,11 @@ A Line Item Tax Line represents the taxes applied on a line item.
## Methods
### beforeInsert
#### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
##### Returns
`void`
@@ -10,7 +10,7 @@ Orchestrates dynamic middleware registered through the Medusa Middleware API
## Constructors
### constructor
#### constructor
`**new MiddlewareService**()`
@@ -57,13 +57,13 @@ Orchestrates dynamic middleware registered through the Medusa Middleware API
## Methods
### addPostAuthentication
#### addPostAuthentication
`**addPostAuthentication**(middleware, options): void`
Adds a middleware function to be called after authentication is completed.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -86,7 +86,7 @@ Adds a middleware function to be called after authentication is completed.
}
]} />
#### Returns
##### Returns
`void`
@@ -104,13 +104,13 @@ Adds a middleware function to be called after authentication is completed.
___
### addPreAuthentication
#### addPreAuthentication
`**addPreAuthentication**(middleware, options): void`
Adds a middleware function to be called before authentication is completed.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -133,7 +133,7 @@ Adds a middleware function to be called before authentication is completed.
}
]} />
#### Returns
##### Returns
`void`
@@ -151,13 +151,13 @@ Adds a middleware function to be called before authentication is completed.
___
### addPreCartCreation
#### addPreCartCreation
`**addPreCartCreation**(middleware): void`
Adds a middleware function to be called before cart creation
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -171,7 +171,7 @@ Adds a middleware function to be called before cart creation
}
]} />
#### Returns
##### Returns
`void`
@@ -189,11 +189,11 @@ Adds a middleware function to be called before cart creation
___
### addRouter
#### addRouter
`**addRouter**(path, router): void`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -216,7 +216,7 @@ ___
}
]} />
#### Returns
##### Returns
`void`
@@ -234,11 +234,11 @@ ___
___
### getRouters
#### getRouters
`**getRouters**(path): Router[]`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -252,7 +252,7 @@ ___
}
]} />
#### Returns
##### Returns
Router[]
@@ -270,13 +270,13 @@ Router[]
___
### usePostAuthentication
#### usePostAuthentication
`**usePostAuthentication**(app): void`
Adds post authentication middleware to an express app.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -290,7 +290,7 @@ Adds post authentication middleware to an express app.
}
]} />
#### Returns
##### Returns
`void`
@@ -308,13 +308,13 @@ Adds post authentication middleware to an express app.
___
### usePreAuthentication
#### usePreAuthentication
`**usePreAuthentication**(app): void`
Adds pre authentication middleware to an express app.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -328,7 +328,7 @@ Adds pre authentication middleware to an express app.
}
]} />
#### Returns
##### Returns
`void`
@@ -346,11 +346,11 @@ Adds pre authentication middleware to an express app.
___
### usePreCartCreation
#### usePreCartCreation
`**usePreCartCreation**(): RequestHandler&#60;ParamsDictionary, any, any, ParsedQs, Record&#60;string, any&#62;&#62;[]`
#### Returns
##### Returns
RequestHandler&#60;ParamsDictionary, any, any, ParsedQs, Record&#60;string, any&#62;&#62;[]
@@ -368,13 +368,13 @@ RequestHandler&#60;ParamsDictionary, any, any, ParsedQs, Record&#60;string, any&
___
### validateMiddleware\_
#### validateMiddleware\_
`**validateMiddleware_**(fn): void`
Validates a middleware function, throws if fn is not of type function.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -388,7 +388,7 @@ Validates a middleware function, throws if fn is not of type function.
}
]} />
#### Returns
##### Returns
`void`
@@ -10,7 +10,7 @@ A Money Amount represent a price amount, for example, a product variant's price
## Constructors
### constructor
#### constructor
`**new MoneyAmount**()`
@@ -120,7 +120,7 @@ A Money Amount represent a price amount, for example, a product variant's price
},
{
"name": "region_id",
"type": "`string`",
"type": "`null` \\| `string`",
"description": "The region's ID",
"optional": false,
"defaultValue": "",
@@ -167,11 +167,11 @@ A Money Amount represent a price amount, for example, a product variant's price
## Methods
### afterLoad
#### afterLoad
`Private **afterLoad**(): void`
#### Returns
##### Returns
`void`
@@ -189,11 +189,11 @@ A Money Amount represent a price amount, for example, a product variant's price
___
### beforeInsert
#### beforeInsert
`Private **beforeInsert**(): undefined \| void`
#### Returns
##### Returns
`undefined` \| `void`
@@ -211,11 +211,11 @@ ___
___
### beforeUpdate
#### beforeUpdate
`Private **beforeUpdate**(): void`
#### Returns
##### Returns
`void`
@@ -8,11 +8,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Constructors
### constructor
#### constructor
`**new NewTotalsService**(«destructured»)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -105,29 +105,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Accessors
### activeManager\_
#### activeManager\_
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
`Protected` **activeManager\_**: [object Object]
## Methods
### atomicPhase\_
#### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -135,6 +119,8 @@ 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",
@@ -156,7 +142,7 @@ transaction manager is created.
}
]} />
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -188,7 +174,7 @@ transaction manager is created.
}
]} />
#### Returns
##### Returns
Promise&#60;TResult&#62;
@@ -206,13 +192,13 @@ Promise&#60;TResult&#62;
___
### getGiftCardTotals
#### getGiftCardTotals
`**getGiftCardTotals**(giftCardableAmount, «destructured»): Promise&#60;&#123; tax_total: number ; total: number &#125;&#62;`
Calculate and return the gift cards totals
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -262,7 +248,7 @@ Calculate and return the gift cards totals
}
]} />
#### Returns
##### Returns
Promise&#60;&#123; tax_total: number ; total: number &#125;&#62;
@@ -280,13 +266,13 @@ Promise&#60;&#123; tax_total: number ; total: number &#125;&#62;
___
### getGiftCardTransactionsTotals
#### getGiftCardTransactionsTotals
`**getGiftCardTransactionsTotals**(«destructured»): &#123; tax_total: number ; total: number &#125;`
Calculate and return the gift cards totals based on their transactions
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -336,7 +322,7 @@ Calculate and return the gift cards totals based on their transactions
}
]} />
#### Returns
##### Returns
`object`
@@ -375,11 +361,11 @@ Calculate and return the gift cards totals based on their transactions
___
### getGiftCardableAmount
#### getGiftCardableAmount
`**getGiftCardableAmount**(«destructured»): number`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -438,7 +424,7 @@ ___
}
]} />
#### Returns
##### Returns
`number`
@@ -456,13 +442,13 @@ ___
___
### getLineItemRefund
#### getLineItemRefund
`**getLineItemRefund**(lineItem, «destructured»): number`
Return the amount that can be refund on a line item
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -548,7 +534,7 @@ Return the amount that can be refund on a line item
}
]} />
#### Returns
##### Returns
`number`
@@ -566,11 +552,11 @@ Return the amount that can be refund on a line item
___
### getLineItemRefundLegacy
#### getLineItemRefundLegacy
`Protected **getLineItemRefundLegacy**(lineItem, «destructured»): number`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -647,7 +633,7 @@ ___
}
]} />
#### Returns
##### Returns
`number`
@@ -665,13 +651,13 @@ ___
___
### getLineItemTotals
#### getLineItemTotals
`**getLineItemTotals**(items, «destructured»): Promise&#60;&#123; [lineItemId: string]: [LineItemTotals](../types/LineItemTotals.mdx); &#125;&#62;`
Calculate and return the items totals for either the legacy calculation or the new calculation
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -721,7 +707,7 @@ Calculate and return the items totals for either the legacy calculation or the n
}
]} />
#### Returns
##### Returns
Promise&#60;&#123; [lineItemId: string]: [LineItemTotals](../types/LineItemTotals.mdx); &#125;&#62;
@@ -739,13 +725,13 @@ Promise&#60;&#123; [lineItemId: string]: [LineItemTotals](../types/LineItemTotal
___
### getLineItemTotalsLegacy
#### getLineItemTotalsLegacy
`Protected **getLineItemTotalsLegacy**(item, «destructured»): Promise&#60;[LineItemTotals](../types/LineItemTotals.mdx)&#62;`
Calculate and return the legacy calculated totals using the tax rate
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -813,7 +799,7 @@ Calculate and return the legacy calculated totals using the tax rate
}
]} />
#### Returns
##### Returns
Promise&#60;[LineItemTotals](../types/LineItemTotals.mdx)&#62;
@@ -831,13 +817,13 @@ Promise&#60;[LineItemTotals](../types/LineItemTotals.mdx)&#62;
___
### getLineItemTotals\_
#### getLineItemTotals\_
`Protected **getLineItemTotals_**(item, «destructured»): Promise&#60;[LineItemTotals](../types/LineItemTotals.mdx)&#62;`
Calculate and return the totals for an item
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -914,7 +900,7 @@ Calculate and return the totals for an item
}
]} />
#### Returns
##### Returns
Promise&#60;[LineItemTotals](../types/LineItemTotals.mdx)&#62;
@@ -932,13 +918,13 @@ Promise&#60;[LineItemTotals](../types/LineItemTotals.mdx)&#62;
___
### getShippingMethodTotals
#### getShippingMethodTotals
`**getShippingMethodTotals**(shippingMethods, «destructured»): Promise&#60;&#123; [shippingMethodId: string]: [ShippingMethodTotals](../types/ShippingMethodTotals.mdx); &#125;&#62;`
Calculate and return the shipping methods totals for either the legacy calculation or the new calculation
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -997,7 +983,7 @@ Calculate and return the shipping methods totals for either the legacy calculati
}
]} />
#### Returns
##### Returns
Promise&#60;&#123; [shippingMethodId: string]: [ShippingMethodTotals](../types/ShippingMethodTotals.mdx); &#125;&#62;
@@ -1015,13 +1001,13 @@ Promise&#60;&#123; [shippingMethodId: string]: [ShippingMethodTotals](../types/S
___
### getShippingMethodTotalsLegacy
#### getShippingMethodTotalsLegacy
`Protected **getShippingMethodTotalsLegacy**(shippingMethod, «destructured»): Promise&#60;[ShippingMethodTotals](../types/ShippingMethodTotals.mdx)&#62;`
Calculate and return the shipping method totals legacy using the tax rate
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -1071,7 +1057,7 @@ Calculate and return the shipping method totals legacy using the tax rate
}
]} />
#### Returns
##### Returns
Promise&#60;[ShippingMethodTotals](../types/ShippingMethodTotals.mdx)&#62;
@@ -1089,13 +1075,13 @@ Promise&#60;[ShippingMethodTotals](../types/ShippingMethodTotals.mdx)&#62;
___
### getShippingMethodTotals\_
#### getShippingMethodTotals\_
`Protected **getShippingMethodTotals_**(shippingMethod, «destructured»): Promise&#60;[ShippingMethodTotals](../types/ShippingMethodTotals.mdx)&#62;`
Calculate and return the shipping method totals
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -1154,7 +1140,7 @@ Calculate and return the shipping method totals
}
]} />
#### Returns
##### Returns
Promise&#60;[ShippingMethodTotals](../types/ShippingMethodTotals.mdx)&#62;
@@ -1172,11 +1158,11 @@ Promise&#60;[ShippingMethodTotals](../types/ShippingMethodTotals.mdx)&#62;
___
### shouldRetryTransaction\_
#### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -1190,7 +1176,7 @@ ___
}
]} />
#### Returns
##### Returns
`boolean`
@@ -1208,11 +1194,11 @@ ___
___
### withTransaction
#### withTransaction
`**withTransaction**(transactionManager?): [NewTotalsService](NewTotalsService.mdx)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -1226,7 +1212,7 @@ ___
}
]} />
#### Returns
##### Returns
[NewTotalsService](NewTotalsService.mdx)
@@ -10,7 +10,7 @@ A Note is an element that can be used in association with different resources to
## Constructors
### constructor
#### constructor
`**new Note**()`
@@ -113,11 +113,11 @@ A Note is an element that can be used in association with different resources to
## Methods
### beforeInsert
#### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
##### Returns
`void`
@@ -8,11 +8,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Constructors
### constructor
#### constructor
`**new NoteService**(«destructured»)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -132,29 +132,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Accessors
### activeManager\_
#### activeManager\_
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
`Protected` **activeManager\_**: [object Object]
## Methods
### atomicPhase\_
#### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -162,6 +146,8 @@ 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",
@@ -183,7 +169,7 @@ transaction manager is created.
}
]} />
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -215,7 +201,7 @@ transaction manager is created.
}
]} />
#### Returns
##### Returns
Promise&#60;TResult&#62;
@@ -233,13 +219,13 @@ Promise&#60;TResult&#62;
___
### create
#### create
`**create**(data, config?): Promise&#60;[Note](Note.mdx)&#62;`
Creates a note associated with a given author
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -271,7 +257,7 @@ Creates a note associated with a given author
}
]} />
#### Returns
##### Returns
Promise&#60;[Note](Note.mdx)&#62;
@@ -289,13 +275,13 @@ Promise&#60;[Note](Note.mdx)&#62;
___
### delete
#### delete
`**delete**(noteId): Promise&#60;void&#62;`
Deletes a given note
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -309,7 +295,7 @@ Deletes a given note
}
]} />
#### Returns
##### Returns
Promise&#60;void&#62;
@@ -327,13 +313,13 @@ Promise&#60;void&#62;
___
### list
#### list
`**list**(selector, config?): Promise&#60;[Note](Note.mdx)[]&#62;`
Fetches all notes related to the given selector
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -356,7 +342,7 @@ Fetches all notes related to the given selector
}
]} />
#### Returns
##### Returns
Promise&#60;[Note](Note.mdx)[]&#62;
@@ -374,13 +360,13 @@ Promise&#60;[Note](Note.mdx)[]&#62;
___
### listAndCount
#### listAndCount
`**listAndCount**(selector, config?): Promise&#60;[[Note](Note.mdx)[], number]&#62;`
Fetches all notes related to the given selector
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -403,7 +389,7 @@ Fetches all notes related to the given selector
}
]} />
#### Returns
##### Returns
Promise&#60;[[Note](Note.mdx)[], number]&#62;
@@ -421,13 +407,13 @@ Promise&#60;[[Note](Note.mdx)[], number]&#62;
___
### retrieve
#### retrieve
`**retrieve**(noteId, config?): Promise&#60;[Note](Note.mdx)&#62;`
Retrieves a specific note.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -450,7 +436,7 @@ Retrieves a specific note.
}
]} />
#### Returns
##### Returns
Promise&#60;[Note](Note.mdx)&#62;
@@ -468,11 +454,11 @@ Promise&#60;[Note](Note.mdx)&#62;
___
### shouldRetryTransaction\_
#### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -486,7 +472,7 @@ ___
}
]} />
#### Returns
##### Returns
`boolean`
@@ -504,13 +490,13 @@ ___
___
### update
#### update
`**update**(noteId, value): Promise&#60;[Note](Note.mdx)&#62;`
Updates a given note with a new value
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -533,7 +519,7 @@ Updates a given note with a new value
}
]} />
#### Returns
##### Returns
Promise&#60;[Note](Note.mdx)&#62;
@@ -551,11 +537,11 @@ Promise&#60;[Note](Note.mdx)&#62;
___
### withTransaction
#### withTransaction
`**withTransaction**(transactionManager?): [NoteService](NoteService.mdx)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -569,7 +555,7 @@ ___
}
]} />
#### Returns
##### Returns
[NoteService](NoteService.mdx)
@@ -10,7 +10,7 @@ A notification is an alert sent, typically to customers, using the installed Not
## Constructors
### constructor
#### constructor
`**new Notification**()`
@@ -158,11 +158,11 @@ A notification is an alert sent, typically to customers, using the installed Not
## Methods
### beforeInsert
#### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
##### Returns
`void`
@@ -10,7 +10,7 @@ A notification provider represents a notification service installed in the Medus
## Constructors
### constructor
#### constructor
`**new NotificationProvider**()`
@@ -8,11 +8,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Constructors
### constructor
#### constructor
`**new NotificationService**(container)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -132,29 +132,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Accessors
### activeManager\_
#### activeManager\_
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
`Protected` **activeManager\_**: [object Object]
## Methods
### atomicPhase\_
#### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -162,6 +146,8 @@ 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",
@@ -183,7 +169,7 @@ transaction manager is created.
}
]} />
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -215,7 +201,7 @@ transaction manager is created.
}
]} />
#### Returns
##### Returns
Promise&#60;TResult&#62;
@@ -233,7 +219,7 @@ Promise&#60;TResult&#62;
___
### handleEvent
#### handleEvent
`**handleEvent**(eventName, data): Promise&#60;undefined \| void \| [Notification](Notification.mdx)[]&#62;`
@@ -241,7 +227,7 @@ Handles an event by relaying the event data to the subscribing providers.
The result of the notification send will be persisted in the database in
order to allow for resends. Will log any errors that are encountered.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -264,7 +250,7 @@ order to allow for resends. Will log any errors that are encountered.
}
]} />
#### Returns
##### Returns
Promise&#60;undefined \| void \| [Notification](Notification.mdx)[]&#62;
@@ -282,13 +268,13 @@ Promise&#60;undefined \| void \| [Notification](Notification.mdx)[]&#62;
___
### list
#### list
`**list**(selector, config?): Promise&#60;[Notification](Notification.mdx)[]&#62;`
Retrieves a list of notifications.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -311,7 +297,7 @@ Retrieves a list of notifications.
}
]} />
#### Returns
##### Returns
Promise&#60;[Notification](Notification.mdx)[]&#62;
@@ -329,13 +315,13 @@ Promise&#60;[Notification](Notification.mdx)[]&#62;
___
### listAndCount
#### listAndCount
`**listAndCount**(selector, config?): Promise&#60;[[Notification](Notification.mdx)[], number]&#62;`
Retrieves a list of notifications and total count.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -358,7 +344,7 @@ Retrieves a list of notifications and total count.
}
]} />
#### Returns
##### Returns
Promise&#60;[[Notification](Notification.mdx)[], number]&#62;
@@ -376,14 +362,14 @@ Promise&#60;[[Notification](Notification.mdx)[], number]&#62;
___
### registerAttachmentGenerator
#### registerAttachmentGenerator
`**registerAttachmentGenerator**(service): void`
Registers an attachment generator to the service. The generator can be
used to generate on demand invoices or other documents.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -397,7 +383,7 @@ used to generate on demand invoices or other documents.
}
]} />
#### Returns
##### Returns
`void`
@@ -415,13 +401,13 @@ used to generate on demand invoices or other documents.
___
### registerInstalledProviders
#### registerInstalledProviders
`**registerInstalledProviders**(providerIds): Promise&#60;void&#62;`
Takes a list of notification provider ids and persists them in the database.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -435,7 +421,7 @@ Takes a list of notification provider ids and persists them in the database.
}
]} />
#### Returns
##### Returns
Promise&#60;void&#62;
@@ -453,14 +439,14 @@ Promise&#60;void&#62;
___
### resend
#### resend
`**resend**(id, config?): Promise&#60;[Notification](Notification.mdx)&#62;`
Resends a notification by retrieving a prior notification and calling the
underlying provider's resendNotification method.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -483,7 +469,7 @@ underlying provider's resendNotification method.
}
]} />
#### Returns
##### Returns
Promise&#60;[Notification](Notification.mdx)&#62;
@@ -501,13 +487,13 @@ Promise&#60;[Notification](Notification.mdx)&#62;
___
### retrieve
#### retrieve
`**retrieve**(id, config?): Promise&#60;[Notification](Notification.mdx)&#62;`
Retrieves a notification with a given id
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -530,7 +516,7 @@ Retrieves a notification with a given id
}
]} />
#### Returns
##### Returns
Promise&#60;[Notification](Notification.mdx)&#62;
@@ -548,14 +534,14 @@ Promise&#60;[Notification](Notification.mdx)&#62;
___
### retrieveProvider\_
#### retrieveProvider\_
`Protected **retrieveProvider_**(id): [AbstractNotificationService](AbstractNotificationService.mdx)`
Finds a provider with a given id. Will throw a NOT\_FOUND error if the
resolution fails.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -569,7 +555,7 @@ resolution fails.
}
]} />
#### Returns
##### Returns
[AbstractNotificationService](AbstractNotificationService.mdx)
@@ -587,14 +573,14 @@ resolution fails.
___
### send
#### send
`**send**(event, eventData, providerId): Promise&#60;undefined \| [Notification](Notification.mdx)&#62;`
Sends a notification, by calling the given provider's sendNotification
method. Persists the Notification in the database.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -626,7 +612,7 @@ method. Persists the Notification in the database.
}
]} />
#### Returns
##### Returns
Promise&#60;undefined \| [Notification](Notification.mdx)&#62;
@@ -644,11 +630,11 @@ Promise&#60;undefined \| [Notification](Notification.mdx)&#62;
___
### shouldRetryTransaction\_
#### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -662,7 +648,7 @@ ___
}
]} />
#### Returns
##### Returns
`boolean`
@@ -680,13 +666,13 @@ ___
___
### subscribe
#### subscribe
`**subscribe**(eventName, providerId): void`
Subscribes a given provider to an event.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -709,7 +695,7 @@ Subscribes a given provider to an event.
}
]} />
#### Returns
##### Returns
`void`
@@ -727,11 +713,11 @@ Subscribes a given provider to an event.
___
### withTransaction
#### withTransaction
`**withTransaction**(transactionManager?): [NotificationService](NotificationService.mdx)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -745,7 +731,7 @@ ___
}
]} />
#### Returns
##### Returns
[NotificationService](NotificationService.mdx)
@@ -10,7 +10,7 @@ Fields used to apply flexible filters on numbers.
## Constructors
### constructor
#### constructor
`**new NumericalComparisonOperator**()`
@@ -8,7 +8,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Constructors
### constructor
#### constructor
`**new Oauth**()`
@@ -73,11 +73,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Methods
### beforeInsert
#### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
##### Returns
`void`
@@ -8,11 +8,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Constructors
### constructor
#### constructor
`**new OauthService**(cradle)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -132,29 +132,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Accessors
### activeManager\_
#### activeManager\_
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
`Protected` **activeManager\_**: [object Object]
## Methods
### atomicPhase\_
#### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -162,6 +146,8 @@ 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",
@@ -183,7 +169,7 @@ transaction manager is created.
}
]} />
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -215,7 +201,7 @@ transaction manager is created.
}
]} />
#### Returns
##### Returns
Promise&#60;TResult&#62;
@@ -233,11 +219,11 @@ Promise&#60;TResult&#62;
___
### create
#### create
`**create**(data): Promise&#60;[Oauth](Oauth.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -251,7 +237,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[Oauth](Oauth.mdx)&#62;
@@ -269,11 +255,11 @@ Promise&#60;[Oauth](Oauth.mdx)&#62;
___
### generateToken
#### generateToken
`**generateToken**(appName, code, state): Promise&#60;[Oauth](Oauth.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -305,7 +291,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[Oauth](Oauth.mdx)&#62;
@@ -323,11 +309,11 @@ Promise&#60;[Oauth](Oauth.mdx)&#62;
___
### list
#### list
`**list**(selector): Promise&#60;[Oauth](Oauth.mdx)[]&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -341,7 +327,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[Oauth](Oauth.mdx)[]&#62;
@@ -359,11 +345,11 @@ Promise&#60;[Oauth](Oauth.mdx)[]&#62;
___
### refreshToken
#### refreshToken
`**refreshToken**(appName): Promise&#60;[Oauth](Oauth.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -377,7 +363,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[Oauth](Oauth.mdx)&#62;
@@ -395,11 +381,11 @@ Promise&#60;[Oauth](Oauth.mdx)&#62;
___
### registerOauthApp
#### registerOauthApp
`**registerOauthApp**(appDetails): Promise&#60;[Oauth](Oauth.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -413,7 +399,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[Oauth](Oauth.mdx)&#62;
@@ -431,11 +417,11 @@ Promise&#60;[Oauth](Oauth.mdx)&#62;
___
### retrieve
#### retrieve
`**retrieve**(oauthId): Promise&#60;[Oauth](Oauth.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -449,7 +435,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[Oauth](Oauth.mdx)&#62;
@@ -467,11 +453,11 @@ Promise&#60;[Oauth](Oauth.mdx)&#62;
___
### retrieveByName
#### retrieveByName
`**retrieveByName**(appName): Promise&#60;[Oauth](Oauth.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -485,7 +471,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[Oauth](Oauth.mdx)&#62;
@@ -503,11 +489,11 @@ Promise&#60;[Oauth](Oauth.mdx)&#62;
___
### shouldRetryTransaction\_
#### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -521,7 +507,7 @@ ___
}
]} />
#### Returns
##### Returns
`boolean`
@@ -539,11 +525,11 @@ ___
___
### update
#### update
`**update**(id, update): Promise&#60;[Oauth](Oauth.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -566,7 +552,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[Oauth](Oauth.mdx)&#62;
@@ -584,11 +570,11 @@ Promise&#60;[Oauth](Oauth.mdx)&#62;
___
### withTransaction
#### withTransaction
`**withTransaction**(transactionManager?): [OauthService](OauthService.mdx)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -602,7 +588,7 @@ ___
}
]} />
#### Returns
##### Returns
[OauthService](OauthService.mdx)
@@ -10,7 +10,7 @@ An order is a purchase made by a customer. It holds details about payment and fu
## Constructors
### constructor
#### constructor
`**new Order**()`
@@ -536,11 +536,11 @@ An order is a purchase made by a customer. It holds details about payment and fu
## Methods
### beforeInsert
#### beforeInsert
`Private **beforeInsert**(): Promise&#60;void&#62;`
#### Returns
##### Returns
Promise&#60;void&#62;
@@ -10,7 +10,7 @@ Order edit allows modifying items in an order, such as adding, updating, or dele
## Constructors
### constructor
#### constructor
`**new OrderEdit**()`
@@ -284,11 +284,11 @@ Order edit allows modifying items in an order, such as adding, updating, or dele
## Methods
### beforeInsert
#### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
##### Returns
`void`
@@ -306,11 +306,11 @@ Order edit allows modifying items in an order, such as adding, updating, or dele
___
### loadStatus
#### loadStatus
`**loadStatus**(): void`
#### Returns
##### Returns
`void`
@@ -8,11 +8,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Constructors
### constructor
#### constructor
`**new OrderEditItemChangeService**(«destructured»)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -141,29 +141,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Accessors
### activeManager\_
#### activeManager\_
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
`Protected` **activeManager\_**: [object Object]
## Methods
### atomicPhase\_
#### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -171,6 +155,8 @@ 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",
@@ -192,7 +178,7 @@ transaction manager is created.
}
]} />
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -224,7 +210,7 @@ transaction manager is created.
}
]} />
#### Returns
##### Returns
Promise&#60;TResult&#62;
@@ -242,11 +228,11 @@ Promise&#60;TResult&#62;
___
### create
#### create
`**create**(data): Promise&#60;[OrderItemChange](OrderItemChange.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -260,7 +246,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[OrderItemChange](OrderItemChange.mdx)&#62;
@@ -278,11 +264,11 @@ Promise&#60;[OrderItemChange](OrderItemChange.mdx)&#62;
___
### delete
#### delete
`**delete**(itemChangeIds): Promise&#60;void&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -296,7 +282,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;void&#62;
@@ -314,11 +300,11 @@ Promise&#60;void&#62;
___
### list
#### list
`**list**(selector, config?): Promise&#60;[OrderItemChange](OrderItemChange.mdx)[]&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -341,7 +327,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[OrderItemChange](OrderItemChange.mdx)[]&#62;
@@ -359,11 +345,11 @@ Promise&#60;[OrderItemChange](OrderItemChange.mdx)[]&#62;
___
### retrieve
#### retrieve
`**retrieve**(id, config?): Promise&#60;[OrderItemChange](OrderItemChange.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -386,7 +372,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[OrderItemChange](OrderItemChange.mdx)&#62;
@@ -404,11 +390,11 @@ Promise&#60;[OrderItemChange](OrderItemChange.mdx)&#62;
___
### shouldRetryTransaction\_
#### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -422,7 +408,7 @@ ___
}
]} />
#### Returns
##### Returns
`boolean`
@@ -440,11 +426,11 @@ ___
___
### withTransaction
#### withTransaction
`**withTransaction**(transactionManager?): [OrderEditItemChangeService](OrderEditItemChangeService.mdx)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -458,7 +444,7 @@ ___
}
]} />
#### Returns
##### Returns
[OrderEditItemChangeService](OrderEditItemChangeService.mdx)
@@ -8,11 +8,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Constructors
### constructor
#### constructor
`**new OrderEditService**(«destructured»)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -222,55 +222,23 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Accessors
### activeManager\_
#### activeManager\_
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
`Protected` **activeManager\_**: [object Object]
___
### inventoryService\_
#### inventoryService\_
`Protected get**inventoryService_**(): undefined \| [IInventoryService](../interfaces/IInventoryService.mdx)`
#### Returns
`undefined` \| [IInventoryService](../interfaces/IInventoryService.mdx)
<ParameterTypes parameters={[
{
"name": "undefined \\| IInventoryService",
"type": "`undefined` \\| [IInventoryService](../interfaces/IInventoryService.mdx)",
"optional": true,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
`Protected` **inventoryService\_**: [object Object]
## Methods
### addLineItem
#### addLineItem
`**addLineItem**(orderEditId, data): Promise&#60;void&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -293,7 +261,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;void&#62;
@@ -311,7 +279,7 @@ Promise&#60;void&#62;
___
### atomicPhase\_
#### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -319,6 +287,8 @@ 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",
@@ -340,7 +310,7 @@ transaction manager is created.
}
]} />
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -372,7 +342,7 @@ transaction manager is created.
}
]} />
#### Returns
##### Returns
Promise&#60;TResult&#62;
@@ -390,11 +360,11 @@ Promise&#60;TResult&#62;
___
### cancel
#### cancel
`**cancel**(orderEditId, context?): Promise&#60;[OrderEdit](OrderEdit.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -426,7 +396,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[OrderEdit](OrderEdit.mdx)&#62;
@@ -444,11 +414,11 @@ Promise&#60;[OrderEdit](OrderEdit.mdx)&#62;
___
### confirm
#### confirm
`**confirm**(orderEditId, context?): Promise&#60;[OrderEdit](OrderEdit.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -480,7 +450,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[OrderEdit](OrderEdit.mdx)&#62;
@@ -498,11 +468,11 @@ Promise&#60;[OrderEdit](OrderEdit.mdx)&#62;
___
### create
#### create
`**create**(data, context): Promise&#60;[OrderEdit](OrderEdit.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -534,7 +504,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[OrderEdit](OrderEdit.mdx)&#62;
@@ -552,11 +522,11 @@ Promise&#60;[OrderEdit](OrderEdit.mdx)&#62;
___
### decline
#### decline
`**decline**(orderEditId, context): Promise&#60;[OrderEdit](OrderEdit.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -597,7 +567,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[OrderEdit](OrderEdit.mdx)&#62;
@@ -615,11 +585,11 @@ Promise&#60;[OrderEdit](OrderEdit.mdx)&#62;
___
### decorateTotals
#### decorateTotals
`**decorateTotals**(orderEdit): Promise&#60;[OrderEdit](OrderEdit.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -633,7 +603,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[OrderEdit](OrderEdit.mdx)&#62;
@@ -651,11 +621,11 @@ Promise&#60;[OrderEdit](OrderEdit.mdx)&#62;
___
### delete
#### delete
`**delete**(id): Promise&#60;void&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -669,7 +639,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;void&#62;
@@ -687,11 +657,11 @@ Promise&#60;void&#62;
___
### deleteClonedItems
#### deleteClonedItems
`Protected **deleteClonedItems**(orderEditId): Promise&#60;void&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -705,7 +675,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;void&#62;
@@ -723,11 +693,11 @@ Promise&#60;void&#62;
___
### deleteItemChange
#### deleteItemChange
`**deleteItemChange**(orderEditId, itemChangeId): Promise&#60;void&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -750,7 +720,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;void&#62;
@@ -768,11 +738,11 @@ Promise&#60;void&#62;
___
### list
#### list
`**list**(selector, config?): Promise&#60;[OrderEdit](OrderEdit.mdx)[]&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -795,7 +765,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[OrderEdit](OrderEdit.mdx)[]&#62;
@@ -813,11 +783,11 @@ Promise&#60;[OrderEdit](OrderEdit.mdx)[]&#62;
___
### listAndCount
#### listAndCount
`**listAndCount**(selector, config?): Promise&#60;[[OrderEdit](OrderEdit.mdx)[], number]&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -840,7 +810,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[[OrderEdit](OrderEdit.mdx)[], number]&#62;
@@ -858,11 +828,11 @@ Promise&#60;[[OrderEdit](OrderEdit.mdx)[], number]&#62;
___
### refreshAdjustments
#### refreshAdjustments
`**refreshAdjustments**(orderEditId, config?): Promise&#60;void&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -894,7 +864,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;void&#62;
@@ -912,11 +882,11 @@ Promise&#60;void&#62;
___
### removeLineItem
#### removeLineItem
`**removeLineItem**(orderEditId, lineItemId): Promise&#60;void&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -939,7 +909,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;void&#62;
@@ -957,11 +927,11 @@ Promise&#60;void&#62;
___
### requestConfirmation
#### requestConfirmation
`**requestConfirmation**(orderEditId, context?): Promise&#60;[OrderEdit](OrderEdit.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -993,7 +963,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[OrderEdit](OrderEdit.mdx)&#62;
@@ -1011,11 +981,11 @@ Promise&#60;[OrderEdit](OrderEdit.mdx)&#62;
___
### retrieve
#### retrieve
`**retrieve**(orderEditId, config?): Promise&#60;[OrderEdit](OrderEdit.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -1038,7 +1008,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[OrderEdit](OrderEdit.mdx)&#62;
@@ -1056,11 +1026,11 @@ Promise&#60;[OrderEdit](OrderEdit.mdx)&#62;
___
### retrieveActive
#### retrieveActive
`Protected **retrieveActive**(orderId, config?): Promise&#60;undefined \| null \| [OrderEdit](OrderEdit.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -1083,7 +1053,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;undefined \| null \| [OrderEdit](OrderEdit.mdx)&#62;
@@ -1101,11 +1071,11 @@ Promise&#60;undefined \| null \| [OrderEdit](OrderEdit.mdx)&#62;
___
### shouldRetryTransaction\_
#### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -1119,7 +1089,7 @@ ___
}
]} />
#### Returns
##### Returns
`boolean`
@@ -1137,11 +1107,11 @@ ___
___
### update
#### update
`**update**(orderEditId, data): Promise&#60;[OrderEdit](OrderEdit.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -1164,7 +1134,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[OrderEdit](OrderEdit.mdx)&#62;
@@ -1182,7 +1152,7 @@ Promise&#60;[OrderEdit](OrderEdit.mdx)&#62;
___
### updateLineItem
#### updateLineItem
`**updateLineItem**(orderEditId, itemId, data): Promise&#60;void&#62;`
@@ -1190,7 +1160,7 @@ Create or update order edit item change line item and apply the quantity
- If the item change already exists then update the quantity of the line item as well as the line adjustments
- If the item change does not exist then create the item change of type update and apply the quantity as well as update the line adjustments
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -1231,7 +1201,7 @@ Create or update order edit item change line item and apply the quantity
}
]} />
#### Returns
##### Returns
Promise&#60;void&#62;
@@ -1249,11 +1219,11 @@ Promise&#60;void&#62;
___
### withTransaction
#### withTransaction
`**withTransaction**(transactionManager?): [OrderEditService](OrderEditService.mdx)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -1267,7 +1237,7 @@ ___
}
]} />
#### Returns
##### Returns
[OrderEditService](OrderEditService.mdx)
@@ -1285,11 +1255,11 @@ ___
___
### isOrderEditActive
#### isOrderEditActive
`Static Private **isOrderEditActive**(orderEdit): boolean`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -1303,7 +1273,7 @@ ___
}
]} />
#### Returns
##### Returns
`boolean`
@@ -10,7 +10,7 @@ An order item change is a change made within an order edit to an order's items.
## Constructors
### constructor
#### constructor
`**new OrderItemChange**()`
@@ -122,11 +122,11 @@ An order item change is a change made within an order edit to an order's items.
## Methods
### beforeInsert
#### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
##### Returns
`void`
@@ -8,11 +8,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Constructors
### constructor
#### constructor
`**new OrderService**(«destructured»)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -420,33 +420,17 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Accessors
### activeManager\_
#### activeManager\_
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
`Protected` **activeManager\_**: [object Object]
## Methods
### addShippingMethod
#### addShippingMethod
`**addShippingMethod**(orderId, optionId, data?, config?): Promise&#60;[Order](Order.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -487,7 +471,7 @@ EntityManager
}
]} />
#### Returns
##### Returns
Promise&#60;[Order](Order.mdx)&#62;
@@ -505,14 +489,14 @@ Promise&#60;[Order](Order.mdx)&#62;
___
### archive
#### archive
`**archive**(orderId): Promise&#60;[Order](Order.mdx)&#62;`
Archives an order. It only alloved, if the order has been fulfilled
and payment has been captured.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -526,7 +510,7 @@ and payment has been captured.
}
]} />
#### Returns
##### Returns
Promise&#60;[Order](Order.mdx)&#62;
@@ -544,7 +528,7 @@ Promise&#60;[Order](Order.mdx)&#62;
___
### atomicPhase\_
#### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -552,6 +536,8 @@ 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",
@@ -573,7 +559,7 @@ transaction manager is created.
}
]} />
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -605,7 +591,7 @@ transaction manager is created.
}
]} />
#### Returns
##### Returns
Promise&#60;TResult&#62;
@@ -623,7 +609,7 @@ Promise&#60;TResult&#62;
___
### cancel
#### cancel
`**cancel**(orderId): Promise&#60;[Order](Order.mdx)&#62;`
@@ -631,7 +617,7 @@ Cancels an order.
Throws if fulfillment process has been initiated.
Throws if payment process has been initiated.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -645,7 +631,7 @@ Throws if payment process has been initiated.
}
]} />
#### Returns
##### Returns
Promise&#60;[Order](Order.mdx)&#62;
@@ -663,13 +649,13 @@ Promise&#60;[Order](Order.mdx)&#62;
___
### cancelFulfillment
#### cancelFulfillment
`**cancelFulfillment**(fulfillmentId): Promise&#60;[Order](Order.mdx)&#62;`
Cancels a fulfillment (if related to an order)
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -683,7 +669,7 @@ Cancels a fulfillment (if related to an order)
}
]} />
#### Returns
##### Returns
Promise&#60;[Order](Order.mdx)&#62;
@@ -701,13 +687,13 @@ Promise&#60;[Order](Order.mdx)&#62;
___
### capturePayment
#### capturePayment
`**capturePayment**(orderId): Promise&#60;[Order](Order.mdx)&#62;`
Captures payment for an order.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -721,7 +707,7 @@ Captures payment for an order.
}
]} />
#### Returns
##### Returns
Promise&#60;[Order](Order.mdx)&#62;
@@ -739,11 +725,11 @@ Promise&#60;[Order](Order.mdx)&#62;
___
### completeOrder
#### completeOrder
`**completeOrder**(orderId): Promise&#60;[Order](Order.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -757,7 +743,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[Order](Order.mdx)&#62;
@@ -775,13 +761,13 @@ Promise&#60;[Order](Order.mdx)&#62;
___
### createFromCart
#### createFromCart
`**createFromCart**(cartOrId): Promise&#60;[Order](Order.mdx)&#62;`
Creates an order from a cart
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -795,7 +781,7 @@ Creates an order from a cart
}
]} />
#### Returns
##### Returns
Promise&#60;[Order](Order.mdx)&#62;
@@ -813,7 +799,7 @@ Promise&#60;[Order](Order.mdx)&#62;
___
### createFulfillment
#### createFulfillment
`**createFulfillment**(orderId, itemsToFulfill, config?): Promise&#60;[Order](Order.mdx)&#62;`
@@ -822,7 +808,7 @@ In a situation where the order has more than one shipping method,
we need to partition the order items, such that they can be sent
to their respective fulfillment provider.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -881,7 +867,7 @@ to their respective fulfillment provider.
}
]} />
#### Returns
##### Returns
Promise&#60;[Order](Order.mdx)&#62;
@@ -899,11 +885,11 @@ Promise&#60;[Order](Order.mdx)&#62;
___
### createGiftCardsFromLineItem\_
#### createGiftCardsFromLineItem\_
`Protected **createGiftCardsFromLineItem_**(order, lineItem, manager): Promise&#60;[GiftCard](GiftCard.mdx)&#62;[]`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -935,7 +921,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[GiftCard](GiftCard.mdx)&#62;[]
@@ -953,13 +939,13 @@ Promise&#60;[GiftCard](GiftCard.mdx)&#62;[]
___
### createRefund
#### createRefund
`**createRefund**(orderId, refundAmount, reason, note?, config?): Promise&#60;[Order](Order.mdx)&#62;`
Refunds a given amount back to the customer.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -1018,7 +1004,7 @@ Refunds a given amount back to the customer.
}
]} />
#### Returns
##### Returns
Promise&#60;[Order](Order.mdx)&#62;
@@ -1036,7 +1022,7 @@ Promise&#60;[Order](Order.mdx)&#62;
___
### createShipment
#### createShipment
`**createShipment**(orderId, fulfillmentId, trackingLinks?, config?): Promise&#60;[Order](Order.mdx)&#62;`
@@ -1044,7 +1030,7 @@ Adds a shipment to the order to indicate that an order has left the
warehouse. Will ask the fulfillment provider for any documents that may
have been created in regards to the shipment.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -1103,7 +1089,7 @@ have been created in regards to the shipment.
}
]} />
#### Returns
##### Returns
Promise&#60;[Order](Order.mdx)&#62;
@@ -1121,13 +1107,13 @@ Promise&#60;[Order](Order.mdx)&#62;
___
### decorateTotals
#### decorateTotals
`**decorateTotals**(order, totalsFields?): Promise&#60;[Order](Order.mdx)&#62;`
Calculate and attach the different total fields on the object
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -1150,7 +1136,7 @@ Calculate and attach the different total fields on the object
}
]} />
#### Returns
##### Returns
Promise&#60;[Order](Order.mdx)&#62;
@@ -1170,7 +1156,7 @@ Promise&#60;[Order](Order.mdx)&#62;
Calculate and attach the different total fields on the object
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -1193,7 +1179,7 @@ Calculate and attach the different total fields on the object
}
]} />
#### Returns
##### Returns
Promise&#60;[Order](Order.mdx)&#62;
@@ -1211,11 +1197,11 @@ Promise&#60;[Order](Order.mdx)&#62;
___
### decorateTotalsLegacy
#### decorateTotalsLegacy
`Protected **decorateTotalsLegacy**(order, totalsFields?): Promise&#60;[Order](Order.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -1238,7 +1224,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[Order](Order.mdx)&#62;
@@ -1256,13 +1242,13 @@ Promise&#60;[Order](Order.mdx)&#62;
___
### getFulfillmentItems
#### getFulfillmentItems
`Protected **getFulfillmentItems**(order, items, transformer): Promise&#60;[LineItem](LineItem.mdx)[]&#62;`
Retrieves the order line items, given an array of items.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -1294,7 +1280,7 @@ Retrieves the order line items, given an array of items.
}
]} />
#### Returns
##### Returns
Promise&#60;[LineItem](LineItem.mdx)[]&#62;
@@ -1312,11 +1298,11 @@ Promise&#60;[LineItem](LineItem.mdx)[]&#62;
___
### getTotalsRelations
#### getTotalsRelations
`Private **getTotalsRelations**(config): string[]`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -1330,7 +1316,7 @@ ___
}
]} />
#### Returns
##### Returns
`string`[]
@@ -1348,11 +1334,11 @@ ___
___
### list
#### list
`**list**(selector, config?): Promise&#60;[Order](Order.mdx)[]&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -1375,7 +1361,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[Order](Order.mdx)[]&#62;
@@ -1393,11 +1379,11 @@ Promise&#60;[Order](Order.mdx)[]&#62;
___
### listAndCount
#### listAndCount
`**listAndCount**(selector, config?): Promise&#60;[[Order](Order.mdx)[], number]&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -1420,7 +1406,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[[Order](Order.mdx)[], number]&#62;
@@ -1438,7 +1424,7 @@ Promise&#60;[[Order](Order.mdx)[], number]&#62;
___
### registerReturnReceived
#### registerReturnReceived
`**registerReturnReceived**(orderId, receivedReturn, customRefundAmount?): Promise&#60;[Order](Order.mdx)&#62;`
@@ -1450,7 +1436,7 @@ returned items are not matching the requested items. Setting the
allowMismatch argument to true, will process the return, ignoring any
mismatches.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -1482,7 +1468,7 @@ mismatches.
}
]} />
#### Returns
##### Returns
Promise&#60;[Order](Order.mdx)&#62;
@@ -1500,13 +1486,13 @@ Promise&#60;[Order](Order.mdx)&#62;
___
### retrieve
#### retrieve
`**retrieve**(orderId, config?): Promise&#60;[Order](Order.mdx)&#62;`
Gets an order by id.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -1529,7 +1515,7 @@ Gets an order by id.
}
]} />
#### Returns
##### Returns
Promise&#60;[Order](Order.mdx)&#62;
@@ -1547,13 +1533,13 @@ Promise&#60;[Order](Order.mdx)&#62;
___
### retrieveByCartId
#### retrieveByCartId
`**retrieveByCartId**(cartId, config?): Promise&#60;[Order](Order.mdx)&#62;`
Gets an order by cart id.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -1576,7 +1562,7 @@ Gets an order by cart id.
}
]} />
#### Returns
##### Returns
Promise&#60;[Order](Order.mdx)&#62;
@@ -1594,11 +1580,11 @@ Promise&#60;[Order](Order.mdx)&#62;
___
### retrieveByCartIdWithTotals
#### retrieveByCartIdWithTotals
`**retrieveByCartIdWithTotals**(cartId, options?): Promise&#60;[Order](Order.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -1621,7 +1607,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[Order](Order.mdx)&#62;
@@ -1639,13 +1625,13 @@ Promise&#60;[Order](Order.mdx)&#62;
___
### retrieveByExternalId
#### retrieveByExternalId
`**retrieveByExternalId**(externalId, config?): Promise&#60;[Order](Order.mdx)&#62;`
Gets an order by id.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -1668,7 +1654,7 @@ Gets an order by id.
}
]} />
#### Returns
##### Returns
Promise&#60;[Order](Order.mdx)&#62;
@@ -1686,11 +1672,11 @@ Promise&#60;[Order](Order.mdx)&#62;
___
### retrieveLegacy
#### retrieveLegacy
`Protected **retrieveLegacy**(orderIdOrSelector, config?): Promise&#60;[Order](Order.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -1713,7 +1699,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[Order](Order.mdx)&#62;
@@ -1731,11 +1717,11 @@ Promise&#60;[Order](Order.mdx)&#62;
___
### retrieveWithTotals
#### retrieveWithTotals
`**retrieveWithTotals**(orderId, options?, context?): Promise&#60;[Order](Order.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -1767,7 +1753,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[Order](Order.mdx)&#62;
@@ -1785,11 +1771,11 @@ Promise&#60;[Order](Order.mdx)&#62;
___
### shouldRetryTransaction\_
#### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -1803,7 +1789,7 @@ ___
}
]} />
#### Returns
##### Returns
`boolean`
@@ -1821,11 +1807,11 @@ ___
___
### transformQueryForTotals
#### transformQueryForTotals
`Protected **transformQueryForTotals**(config): &#123; relations: undefined \| string[] ; select: undefined \| keyof [Order](Order.mdx)[] ; totalsToSelect: undefined \| keyof [Order](Order.mdx)[] &#125;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -1839,7 +1825,7 @@ ___
}
]} />
#### Returns
##### Returns
`object`
@@ -1887,7 +1873,7 @@ ___
___
### update
#### update
`**update**(orderId, update): Promise&#60;[Order](Order.mdx)&#62;`
@@ -1895,7 +1881,7 @@ Updates an order. Metadata updates should
use dedicated method, e.g. `setMetadata` etc. The function
will throw errors if metadata updates are attempted.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -1918,7 +1904,7 @@ will throw errors if metadata updates are attempted.
}
]} />
#### Returns
##### Returns
Promise&#60;[Order](Order.mdx)&#62;
@@ -1936,13 +1922,13 @@ Promise&#60;[Order](Order.mdx)&#62;
___
### updateBillingAddress
#### updateBillingAddress
`Protected **updateBillingAddress**(order, address): Promise&#60;void&#62;`
Updates the order's billing address.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -1965,7 +1951,7 @@ Updates the order's billing address.
}
]} />
#### Returns
##### Returns
Promise&#60;void&#62;
@@ -1983,13 +1969,13 @@ Promise&#60;void&#62;
___
### updateShippingAddress
#### updateShippingAddress
`Protected **updateShippingAddress**(order, address): Promise&#60;void&#62;`
Updates the order's shipping address.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -2012,7 +1998,7 @@ Updates the order's shipping address.
}
]} />
#### Returns
##### Returns
Promise&#60;void&#62;
@@ -2030,7 +2016,7 @@ Promise&#60;void&#62;
___
### validateFulfillmentLineItem
#### validateFulfillmentLineItem
`Protected **validateFulfillmentLineItem**(item, quantity): null \| [LineItem](LineItem.mdx)`
@@ -2039,7 +2025,7 @@ fulfillable quantity is lower than the requested fulfillment quantity.
Fulfillable quantity is calculated by subtracting the already fulfilled
quantity from the quantity that was originally purchased.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -2062,7 +2048,7 @@ quantity from the quantity that was originally purchased.
}
]} />
#### Returns
##### Returns
`null` \| [LineItem](LineItem.mdx)
@@ -2080,11 +2066,11 @@ quantity from the quantity that was originally purchased.
___
### withTransaction
#### withTransaction
`**withTransaction**(transactionManager?): [OrderService](OrderService.mdx)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -2098,7 +2084,7 @@ ___
}
]} />
#### Returns
##### Returns
[OrderService](OrderService.mdx)
@@ -8,7 +8,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Constructors
### constructor
#### constructor
`**new OrdersReturnItem**()`
@@ -10,7 +10,7 @@ A payment is originally created from a payment session. Once a payment session i
## Constructors
### constructor
#### constructor
`**new Payment**()`
@@ -194,11 +194,11 @@ A payment is originally created from a payment session. Once a payment session i
## Methods
### beforeInsert
#### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
##### Returns
`void`
@@ -10,7 +10,7 @@ A payment collection allows grouping and managing a list of payments at one. Thi
## Constructors
### constructor
#### constructor
`**new PaymentCollection**()`
@@ -176,11 +176,11 @@ A payment collection allows grouping and managing a list of payments at one. Thi
## Methods
### beforeInsert
#### beforeInsert
`Private **beforeInsert**(): void`
#### Returns
##### Returns
`void`
@@ -8,11 +8,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Constructors
### constructor
#### constructor
`**new PaymentCollectionService**(«destructured»)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -159,29 +159,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Accessors
### activeManager\_
#### activeManager\_
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
`Protected` **activeManager\_**: [object Object]
## Methods
### atomicPhase\_
#### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -189,6 +173,8 @@ 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",
@@ -210,7 +196,7 @@ transaction manager is created.
}
]} />
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -242,7 +228,7 @@ transaction manager is created.
}
]} />
#### Returns
##### Returns
Promise&#60;TResult&#62;
@@ -260,13 +246,13 @@ Promise&#60;TResult&#62;
___
### authorizePaymentSessions
#### authorizePaymentSessions
`**authorizePaymentSessions**(paymentCollectionId, sessionIds, context?): Promise&#60;[PaymentCollection](PaymentCollection.mdx)&#62;`
Authorizes the payment sessions of a payment collection.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -298,7 +284,7 @@ Authorizes the payment sessions of a payment collection.
}
]} />
#### Returns
##### Returns
Promise&#60;[PaymentCollection](PaymentCollection.mdx)&#62;
@@ -316,13 +302,13 @@ Promise&#60;[PaymentCollection](PaymentCollection.mdx)&#62;
___
### create
#### create
`**create**(data): Promise&#60;[PaymentCollection](PaymentCollection.mdx)&#62;`
Creates a new payment collection.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -336,7 +322,7 @@ Creates a new payment collection.
}
]} />
#### Returns
##### Returns
Promise&#60;[PaymentCollection](PaymentCollection.mdx)&#62;
@@ -354,13 +340,13 @@ Promise&#60;[PaymentCollection](PaymentCollection.mdx)&#62;
___
### delete
#### delete
`**delete**(paymentCollectionId): Promise&#60;undefined \| [PaymentCollection](PaymentCollection.mdx)&#62;`
Deletes a payment collection.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -374,7 +360,7 @@ Deletes a payment collection.
}
]} />
#### Returns
##### Returns
Promise&#60;undefined \| [PaymentCollection](PaymentCollection.mdx)&#62;
@@ -392,11 +378,11 @@ Promise&#60;undefined \| [PaymentCollection](PaymentCollection.mdx)&#62;
___
### isValidTotalAmount
#### isValidTotalAmount
`Private **isValidTotalAmount**(total, sessionsInput): boolean`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -419,7 +405,7 @@ ___
}
]} />
#### Returns
##### Returns
`boolean`
@@ -437,13 +423,13 @@ ___
___
### markAsAuthorized
#### markAsAuthorized
`**markAsAuthorized**(paymentCollectionId): Promise&#60;[PaymentCollection](PaymentCollection.mdx)&#62;`
Marks a payment collection as authorized bypassing the payment flow.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -457,7 +443,7 @@ Marks a payment collection as authorized bypassing the payment flow.
}
]} />
#### Returns
##### Returns
Promise&#60;[PaymentCollection](PaymentCollection.mdx)&#62;
@@ -475,13 +461,13 @@ Promise&#60;[PaymentCollection](PaymentCollection.mdx)&#62;
___
### refreshPaymentSession
#### refreshPaymentSession
`**refreshPaymentSession**(paymentCollectionId, sessionId, customerId): Promise&#60;[PaymentSession](PaymentSession.mdx)&#62;`
Removes and recreate a payment session of a payment collection.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -513,7 +499,7 @@ Removes and recreate a payment session of a payment collection.
}
]} />
#### Returns
##### Returns
Promise&#60;[PaymentSession](PaymentSession.mdx)&#62;
@@ -531,13 +517,13 @@ Promise&#60;[PaymentSession](PaymentSession.mdx)&#62;
___
### retrieve
#### retrieve
`**retrieve**(paymentCollectionId, config?): Promise&#60;[PaymentCollection](PaymentCollection.mdx)&#62;`
Retrieves a payment collection by id.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -560,7 +546,7 @@ Retrieves a payment collection by id.
}
]} />
#### Returns
##### Returns
Promise&#60;[PaymentCollection](PaymentCollection.mdx)&#62;
@@ -578,13 +564,13 @@ Promise&#60;[PaymentCollection](PaymentCollection.mdx)&#62;
___
### setPaymentSession
#### setPaymentSession
`**setPaymentSession**(paymentCollectionId, sessionInput, customerId): Promise&#60;[PaymentCollection](PaymentCollection.mdx)&#62;`
Manages a single payment sessions of a payment collection.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -616,7 +602,7 @@ Manages a single payment sessions of a payment collection.
}
]} />
#### Returns
##### Returns
Promise&#60;[PaymentCollection](PaymentCollection.mdx)&#62;
@@ -634,13 +620,13 @@ Promise&#60;[PaymentCollection](PaymentCollection.mdx)&#62;
___
### setPaymentSessionsBatch
#### setPaymentSessionsBatch
`**setPaymentSessionsBatch**(paymentCollectionOrId, sessionsInput, customerId): Promise&#60;[PaymentCollection](PaymentCollection.mdx)&#62;`
Manages multiple payment sessions of a payment collection.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -672,7 +658,7 @@ Manages multiple payment sessions of a payment collection.
}
]} />
#### Returns
##### Returns
Promise&#60;[PaymentCollection](PaymentCollection.mdx)&#62;
@@ -690,11 +676,11 @@ Promise&#60;[PaymentCollection](PaymentCollection.mdx)&#62;
___
### shouldRetryTransaction\_
#### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -708,7 +694,7 @@ ___
}
]} />
#### Returns
##### Returns
`boolean`
@@ -726,13 +712,13 @@ ___
___
### update
#### update
`**update**(paymentCollectionId, data): Promise&#60;[PaymentCollection](PaymentCollection.mdx)&#62;`
Updates a payment collection.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -755,7 +741,7 @@ Updates a payment collection.
}
]} />
#### Returns
##### Returns
Promise&#60;[PaymentCollection](PaymentCollection.mdx)&#62;
@@ -773,11 +759,11 @@ Promise&#60;[PaymentCollection](PaymentCollection.mdx)&#62;
___
### withTransaction
#### withTransaction
`**withTransaction**(transactionManager?): [PaymentCollectionService](PaymentCollectionService.mdx)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -791,7 +777,7 @@ ___
}
]} />
#### Returns
##### Returns
[PaymentCollectionService](PaymentCollectionService.mdx)
@@ -10,7 +10,7 @@ A payment provider represents a payment service installed in the Medusa backend,
## Constructors
### constructor
#### constructor
`**new PaymentProvider**()`
@@ -10,11 +10,11 @@ Helps retrieve payment providers
## Constructors
### constructor
#### constructor
`**new PaymentProviderService**(container)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -152,51 +152,19 @@ Helps retrieve payment providers
## Accessors
### activeManager\_
#### activeManager\_
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
`Protected` **activeManager\_**: [object Object]
___
### paymentService\_
#### paymentService\_
`Protected get**paymentService_**(): [PaymentService](PaymentService.mdx)`
#### Returns
[PaymentService](PaymentService.mdx)
<ParameterTypes parameters={[
{
"name": "default",
"type": "[PaymentService](PaymentService.mdx)",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
`Protected` **paymentService\_**: [object Object]
## Methods
### atomicPhase\_
#### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -204,6 +172,8 @@ 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",
@@ -225,7 +195,7 @@ transaction manager is created.
}
]} />
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -257,7 +227,7 @@ transaction manager is created.
}
]} />
#### Returns
##### Returns
Promise&#60;TResult&#62;
@@ -275,11 +245,11 @@ Promise&#60;TResult&#62;
___
### authorizePayment
#### authorizePayment
`**authorizePayment**(paymentSession, context): Promise&#60;undefined \| [PaymentSession](PaymentSession.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -302,7 +272,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;undefined \| [PaymentSession](PaymentSession.mdx)&#62;
@@ -320,13 +290,13 @@ Promise&#60;undefined \| [PaymentSession](PaymentSession.mdx)&#62;
___
### buildPaymentProcessorContext
#### buildPaymentProcessorContext
`Protected **buildPaymentProcessorContext**(cartOrData): [Cart](Cart.mdx) & [PaymentContext](../types/PaymentContext.mdx)`
Build the create session context for both legacy and new API
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -340,7 +310,7 @@ Build the create session context for both legacy and new API
}
]} />
#### Returns
##### Returns
[Cart](Cart.mdx) & [PaymentContext](../types/PaymentContext.mdx)
@@ -358,11 +328,11 @@ Build the create session context for both legacy and new API
___
### cancelPayment
#### cancelPayment
`**cancelPayment**(paymentObj): Promise&#60;[Payment](Payment.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -376,7 +346,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[Payment](Payment.mdx)&#62;
@@ -394,11 +364,11 @@ Promise&#60;[Payment](Payment.mdx)&#62;
___
### capturePayment
#### capturePayment
`**capturePayment**(paymentObj): Promise&#60;[Payment](Payment.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -412,7 +382,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[Payment](Payment.mdx)&#62;
@@ -430,11 +400,11 @@ Promise&#60;[Payment](Payment.mdx)&#62;
___
### createPayment
#### createPayment
`**createPayment**(data): Promise&#60;[Payment](Payment.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -448,7 +418,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[Payment](Payment.mdx)&#62;
@@ -466,11 +436,11 @@ Promise&#60;[Payment](Payment.mdx)&#62;
___
### createSession
#### createSession
`**createSession**(providerId, cart): Promise&#60;[PaymentSession](PaymentSession.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -493,7 +463,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[PaymentSession](PaymentSession.mdx)&#62;
@@ -515,7 +485,7 @@ Promise&#60;[PaymentSession](PaymentSession.mdx)&#62;
Creates a payment session with the given provider.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -529,7 +499,7 @@ Creates a payment session with the given provider.
}
]} />
#### Returns
##### Returns
Promise&#60;[PaymentSession](PaymentSession.mdx)&#62;
@@ -547,11 +517,11 @@ Promise&#60;[PaymentSession](PaymentSession.mdx)&#62;
___
### deleteSession
#### deleteSession
`**deleteSession**(paymentSession): Promise&#60;undefined \| [PaymentSession](PaymentSession.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -565,7 +535,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;undefined \| [PaymentSession](PaymentSession.mdx)&#62;
@@ -583,11 +553,11 @@ Promise&#60;undefined \| [PaymentSession](PaymentSession.mdx)&#62;
___
### getStatus
#### getStatus
`**getStatus**(payment): Promise&#60;[PaymentSessionStatus](../enums/PaymentSessionStatus.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -601,7 +571,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[PaymentSessionStatus](../enums/PaymentSessionStatus.mdx)&#62;
@@ -619,11 +589,11 @@ Promise&#60;[PaymentSessionStatus](../enums/PaymentSessionStatus.mdx)&#62;
___
### list
#### list
`**list**(): Promise&#60;[PaymentProvider](PaymentProvider.mdx)[]&#62;`
#### Returns
##### Returns
Promise&#60;[PaymentProvider](PaymentProvider.mdx)[]&#62;
@@ -641,13 +611,13 @@ Promise&#60;[PaymentProvider](PaymentProvider.mdx)[]&#62;
___
### listPayments
#### listPayments
`**listPayments**(selector, config?): Promise&#60;[Payment](Payment.mdx)[]&#62;`
List all the payments according to the given selector and config.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -670,7 +640,7 @@ List all the payments according to the given selector and config.
}
]} />
#### Returns
##### Returns
Promise&#60;[Payment](Payment.mdx)[]&#62;
@@ -688,13 +658,13 @@ Promise&#60;[Payment](Payment.mdx)[]&#62;
___
### processUpdateRequestsData
#### processUpdateRequestsData
`Protected **processUpdateRequestsData**(data?, paymentResponse): Promise&#60;void&#62;`
Process the collected data. Can be used every time we need to process some collected data returned by the provider
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -735,7 +705,7 @@ Process the collected data. Can be used every time we need to process some colle
}
]} />
#### Returns
##### Returns
Promise&#60;void&#62;
@@ -753,14 +723,14 @@ Promise&#60;void&#62;
___
### refreshSession
#### refreshSession
`**refreshSession**(paymentSession, sessionInput): Promise&#60;[PaymentSession](PaymentSession.mdx)&#62;`
Refreshes a payment session with the given provider.
This means, that we delete the current one and create a new.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -810,7 +780,7 @@ This means, that we delete the current one and create a new.
}
]} />
#### Returns
##### Returns
Promise&#60;[PaymentSession](PaymentSession.mdx)&#62;
@@ -828,11 +798,11 @@ Promise&#60;[PaymentSession](PaymentSession.mdx)&#62;
___
### refundFromPayment
#### refundFromPayment
`**refundFromPayment**(payment, amount, reason, note?): Promise&#60;[Refund](Refund.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -873,7 +843,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[Refund](Refund.mdx)&#62;
@@ -891,11 +861,11 @@ Promise&#60;[Refund](Refund.mdx)&#62;
___
### refundPayment
#### refundPayment
`**refundPayment**(payObjs, amount, reason, note?): Promise&#60;[Refund](Refund.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -936,7 +906,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[Refund](Refund.mdx)&#62;
@@ -954,11 +924,11 @@ Promise&#60;[Refund](Refund.mdx)&#62;
___
### registerInstalledProviders
#### registerInstalledProviders
`**registerInstalledProviders**(providerIds): Promise&#60;void&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -972,7 +942,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;void&#62;
@@ -990,13 +960,13 @@ Promise&#60;void&#62;
___
### retrievePayment
#### retrievePayment
`**retrievePayment**(paymentId, relations?): Promise&#60;[Payment](Payment.mdx)&#62;`
Retrieve a payment entity with the given id.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -1019,7 +989,7 @@ Retrieve a payment entity with the given id.
}
]} />
#### Returns
##### Returns
Promise&#60;[Payment](Payment.mdx)&#62;
@@ -1037,12 +1007,14 @@ Promise&#60;[Payment](Payment.mdx)&#62;
___
### retrieveProvider
#### retrieveProvider
`**retrieveProvider**<TypeParameter TProvider>(providerId): TProvider extends [AbstractPaymentService](AbstractPaymentService.mdx) ? [AbstractPaymentService](AbstractPaymentService.mdx) : TProvider extends [AbstractPaymentProcessor](AbstractPaymentProcessor.mdx) ? [AbstractPaymentProcessor](AbstractPaymentProcessor.mdx) : any`
Finds a provider given an id
##### Type Parameters
<ParameterTypes parameters={[
{
"name": "TProvider",
@@ -1055,7 +1027,7 @@ Finds a provider given an id
}
]} />
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -1069,7 +1041,7 @@ Finds a provider given an id
}
]} />
#### Returns
##### Returns
`TProvider` extends [AbstractPaymentService](AbstractPaymentService.mdx) ? [AbstractPaymentService](AbstractPaymentService.mdx) : `TProvider` extends [AbstractPaymentProcessor](AbstractPaymentProcessor.mdx) ? [AbstractPaymentProcessor](AbstractPaymentProcessor.mdx) : `any`
@@ -1087,11 +1059,11 @@ Finds a provider given an id
___
### retrieveRefund
#### retrieveRefund
`**retrieveRefund**(id, config?): Promise&#60;[Refund](Refund.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -1114,7 +1086,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[Refund](Refund.mdx)&#62;
@@ -1132,13 +1104,13 @@ Promise&#60;[Refund](Refund.mdx)&#62;
___
### retrieveSession
#### retrieveSession
`**retrieveSession**(paymentSessionId, relations?): Promise&#60;[PaymentSession](PaymentSession.mdx)&#62;`
Return the payment session for the given id.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -1161,7 +1133,7 @@ Return the payment session for the given id.
}
]} />
#### Returns
##### Returns
Promise&#60;[PaymentSession](PaymentSession.mdx)&#62;
@@ -1179,13 +1151,13 @@ Promise&#60;[PaymentSession](PaymentSession.mdx)&#62;
___
### saveSession
#### saveSession
`Protected **saveSession**(providerId, data): Promise&#60;[PaymentSession](PaymentSession.mdx)&#62;`
Create or update a Payment session data.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -1271,7 +1243,7 @@ Create or update a Payment session data.
}
]} />
#### Returns
##### Returns
Promise&#60;[PaymentSession](PaymentSession.mdx)&#62;
@@ -1289,11 +1261,11 @@ Promise&#60;[PaymentSession](PaymentSession.mdx)&#62;
___
### shouldRetryTransaction\_
#### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -1307,7 +1279,7 @@ ___
}
]} />
#### Returns
##### Returns
`boolean`
@@ -1325,11 +1297,11 @@ ___
___
### throwFromPaymentProcessorError
#### throwFromPaymentProcessorError
`Private **throwFromPaymentProcessorError**(errObj): void`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -1343,7 +1315,7 @@ ___
}
]} />
#### Returns
##### Returns
`void`
@@ -1361,11 +1333,11 @@ ___
___
### updatePayment
#### updatePayment
`**updatePayment**(paymentId, data): Promise&#60;[Payment](Payment.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -1406,7 +1378,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[Payment](Payment.mdx)&#62;
@@ -1424,13 +1396,13 @@ Promise&#60;[Payment](Payment.mdx)&#62;
___
### updateSession
#### updateSession
`**updateSession**(paymentSession, sessionInput): Promise&#60;[PaymentSession](PaymentSession.mdx)&#62;`
Update a payment session with the given provider.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -1480,7 +1452,7 @@ Update a payment session with the given provider.
}
]} />
#### Returns
##### Returns
Promise&#60;[PaymentSession](PaymentSession.mdx)&#62;
@@ -1498,11 +1470,11 @@ Promise&#60;[PaymentSession](PaymentSession.mdx)&#62;
___
### updateSessionData
#### updateSessionData
`**updateSessionData**(paymentSession, data): Promise&#60;[PaymentSession](PaymentSession.mdx)&#62;`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -1525,7 +1497,7 @@ ___
}
]} />
#### Returns
##### Returns
Promise&#60;[PaymentSession](PaymentSession.mdx)&#62;
@@ -1543,11 +1515,11 @@ Promise&#60;[PaymentSession](PaymentSession.mdx)&#62;
___
### withTransaction
#### withTransaction
`**withTransaction**(transactionManager?): [PaymentProviderService](PaymentProviderService.mdx)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -1561,7 +1533,7 @@ ___
}
]} />
#### Returns
##### Returns
[PaymentProviderService](PaymentProviderService.mdx)
@@ -8,11 +8,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Constructors
### constructor
#### constructor
`**new PaymentService**(«destructured»)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -168,29 +168,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
## Accessors
### activeManager\_
#### activeManager\_
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
`Protected` **activeManager\_**: [object Object]
## Methods
### atomicPhase\_
#### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -198,6 +182,8 @@ 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",
@@ -219,7 +205,7 @@ transaction manager is created.
}
]} />
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -251,7 +237,7 @@ transaction manager is created.
}
]} />
#### Returns
##### Returns
Promise&#60;TResult&#62;
@@ -269,13 +255,13 @@ Promise&#60;TResult&#62;
___
### capture
#### capture
`**capture**(paymentOrId): Promise&#60;[Payment](Payment.mdx)&#62;`
Captures a payment.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -289,7 +275,7 @@ Captures a payment.
}
]} />
#### Returns
##### Returns
Promise&#60;[Payment](Payment.mdx)&#62;
@@ -307,13 +293,13 @@ Promise&#60;[Payment](Payment.mdx)&#62;
___
### create
#### create
`**create**(paymentInput): Promise&#60;[Payment](Payment.mdx)&#62;`
Created a new payment.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -327,7 +313,7 @@ Created a new payment.
}
]} />
#### Returns
##### Returns
Promise&#60;[Payment](Payment.mdx)&#62;
@@ -345,13 +331,13 @@ Promise&#60;[Payment](Payment.mdx)&#62;
___
### refund
#### refund
`**refund**(paymentOrId, amount, reason, note?): Promise&#60;[Refund](Refund.mdx)&#62;`
refunds a payment.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -392,7 +378,7 @@ refunds a payment.
}
]} />
#### Returns
##### Returns
Promise&#60;[Refund](Refund.mdx)&#62;
@@ -410,13 +396,13 @@ Promise&#60;[Refund](Refund.mdx)&#62;
___
### retrieve
#### retrieve
`**retrieve**(paymentId, config?): Promise&#60;[Payment](Payment.mdx)&#62;`
Retrieves a payment by id.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -439,7 +425,7 @@ Retrieves a payment by id.
}
]} />
#### Returns
##### Returns
Promise&#60;[Payment](Payment.mdx)&#62;
@@ -457,11 +443,11 @@ Promise&#60;[Payment](Payment.mdx)&#62;
___
### shouldRetryTransaction\_
#### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -475,7 +461,7 @@ ___
}
]} />
#### Returns
##### Returns
`boolean`
@@ -493,13 +479,13 @@ ___
___
### update
#### update
`**update**(paymentId, data): Promise&#60;[Payment](Payment.mdx)&#62;`
Updates a payment in order to link it to an order or a swap.
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -540,7 +526,7 @@ Updates a payment in order to link it to an order or a swap.
}
]} />
#### Returns
##### Returns
Promise&#60;[Payment](Payment.mdx)&#62;
@@ -558,11 +544,11 @@ Promise&#60;[Payment](Payment.mdx)&#62;
___
### withTransaction
#### withTransaction
`**withTransaction**(transactionManager?): [PaymentService](PaymentService.mdx)`
#### Parameters
##### Parameters
<ParameterTypes parameters={[
{
@@ -576,7 +562,7 @@ ___
}
]} />
#### Returns
##### Returns
[PaymentService](PaymentService.mdx)
Loaded 100 of 1383 files, more files were not shown because too many files have changed in this diff. Show more