docs: TSDoc + reference of fulfillment service (#5761)

This commit is contained in:
Shahed Nasser authored and GitHub committed 2023-11-29 11:58:08 +00:00
1 parent 8f25ed8a10
commit f802e2460f
1479 files changed
+30259 -16135

No files matched your search

@@ -10,13 +10,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
- [IBatchJobStrategy](../interfaces/IBatchJobStrategy.mdx)
## Constructors
#### constructor
## constructor
`Protected **new AbstractBatchJobStrategy**(__container__, __configModule__?, __moduleDeclaration__?)`
##### Parameters
### Parameters
<ParameterTypes parameters={[
{
@@ -48,6 +46,8 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
}
]} />
___
## Properties
<ParameterTypes parameters={[
@@ -125,15 +125,35 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
}
]} />
___
## Accessors
#### activeManager\_
### activeManager\_
`Protected` **activeManager\_**: [object Object]
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
#### atomicPhase\_
### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -141,7 +161,7 @@ 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
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -164,7 +184,7 @@ transaction manager is created.
}
]} />
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -196,7 +216,7 @@ transaction manager is created.
}
]} />
##### Returns
#### Returns
Promise&#60;TResult&#62;
@@ -214,13 +234,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;
@@ -238,11 +258,11 @@ Promise&#60;string&#62;
___
#### handleProcessingError
### handleProcessingError
`Protected **handleProcessingError**<TypeParameter T>(batchJobId, err, result): Promise&#60;void&#62;`
##### Type Parameters
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -256,7 +276,7 @@ ___
}
]} />
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -288,7 +308,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;void&#62;
@@ -306,13 +326,13 @@ Promise&#60;void&#62;
___
#### preProcessBatchJob
### preProcessBatchJob
`**preProcessBatchJob**(batchJobId): Promise&#60;void&#62;`
Method for pre-processing a batch job
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -326,7 +346,7 @@ Method for pre-processing a batch job
}
]} />
##### Returns
#### Returns
Promise&#60;void&#62;
@@ -344,13 +364,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={[
{
@@ -373,7 +393,7 @@ Method for preparing a batch job for processing
}
]} />
##### Returns
#### Returns
Promise&#60;[CreateBatchJobInput](../types/CreateBatchJobInput.mdx)&#62;
@@ -391,13 +411,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={[
{
@@ -411,7 +431,7 @@ Method does the actual processing of the job. Should report back on the progress
}
]} />
##### Returns
#### Returns
Promise&#60;void&#62;
@@ -429,11 +449,11 @@ Promise&#60;void&#62;
___
#### shouldRetryOnProcessingError
### shouldRetryOnProcessingError
`Protected **shouldRetryOnProcessingError**(batchJob, err): Promise&#60;boolean&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -456,7 +476,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;boolean&#62;
@@ -474,11 +494,11 @@ Promise&#60;boolean&#62;
___
#### shouldRetryTransaction\_
### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -492,7 +512,7 @@ ___
}
]} />
##### Returns
#### Returns
`boolean`
@@ -510,11 +530,11 @@ ___
___
#### withTransaction
### withTransaction
`**withTransaction**(transactionManager?): [AbstractBatchJobStrategy](AbstractBatchJobStrategy.mdx)`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -528,7 +548,7 @@ ___
}
]} />
##### Returns
#### Returns
[AbstractBatchJobStrategy](AbstractBatchJobStrategy.mdx)
@@ -10,12 +10,12 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
- [IEventBusModuleService](../interfaces/IEventBusModuleService.mdx)
## Constructors
#### constructor
## constructor
`**new AbstractEventBusModuleService**()`
___
## Properties
<ParameterTypes parameters={[
@@ -30,19 +30,39 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
}
]} />
___
## Accessors
#### eventToSubscribersMap
### eventToSubscribersMap
**eventToSubscribersMap**: [object Object]
`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": []
}
]} />
___
## Methods
#### emit
### emit
`Abstract **emit**<TypeParameter T>(eventName, data, options): Promise&#60;void&#62;`
##### Type Parameters
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -56,7 +76,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
}
]} />
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -88,7 +108,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
}
]} />
##### Returns
#### Returns
Promise&#60;void&#62;
@@ -106,7 +126,7 @@ Promise&#60;void&#62;
`Abstract **emit**<TypeParameter T>(data): Promise&#60;void&#62;`
##### Type Parameters
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -120,7 +140,7 @@ Promise&#60;void&#62;
}
]} />
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -134,7 +154,7 @@ Promise&#60;void&#62;
}
]} />
##### Returns
#### Returns
Promise&#60;void&#62;
@@ -152,11 +172,11 @@ Promise&#60;void&#62;
___
#### storeSubscribers
### storeSubscribers
`Protected **storeSubscribers**(«destructured»): void`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -197,7 +217,7 @@ ___
}
]} />
##### Returns
#### Returns
`void`
@@ -215,11 +235,11 @@ ___
___
#### subscribe
### subscribe
`**subscribe**(eventName, subscriber, context?): [AbstractEventBusModuleService](AbstractEventBusModuleService.mdx)`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -251,7 +271,7 @@ ___
}
]} />
##### Returns
#### Returns
[AbstractEventBusModuleService](AbstractEventBusModuleService.mdx)
@@ -269,11 +289,11 @@ ___
___
#### unsubscribe
### unsubscribe
`**unsubscribe**(eventName, subscriber, context): [AbstractEventBusModuleService](AbstractEventBusModuleService.mdx)`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -305,7 +325,7 @@ ___
}
]} />
##### Returns
#### Returns
[AbstractEventBusModuleService](AbstractEventBusModuleService.mdx)
@@ -10,13 +10,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
- [INotificationService](../interfaces/INotificationService.mdx)
## Constructors
#### constructor
## constructor
`Protected **new AbstractNotificationService**(__container__, __configModule__?, __moduleDeclaration__?)`
##### Parameters
### Parameters
<ParameterTypes parameters={[
{
@@ -48,6 +46,8 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
}
]} />
___
## Properties
<ParameterTypes parameters={[
@@ -107,15 +107,35 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
}
]} />
___
## Accessors
#### activeManager\_
### activeManager\_
`Protected` **activeManager\_**: [object Object]
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
#### atomicPhase\_
### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -123,7 +143,7 @@ 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
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -146,7 +166,7 @@ transaction manager is created.
}
]} />
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -178,7 +198,7 @@ transaction manager is created.
}
]} />
##### Returns
#### Returns
Promise&#60;TResult&#62;
@@ -196,11 +216,11 @@ Promise&#60;TResult&#62;
___
#### getIdentifier
### getIdentifier
`**getIdentifier**(): string`
##### Returns
#### Returns
`string`
@@ -218,11 +238,11 @@ ___
___
#### resendNotification
### resendNotification
`Abstract **resendNotification**(notification, config, attachmentGenerator): Promise&#60;[ReturnedData](../types/ReturnedData.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -254,7 +274,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[ReturnedData](../types/ReturnedData.mdx)&#62;
@@ -272,11 +292,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={[
{
@@ -308,7 +328,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[ReturnedData](../types/ReturnedData.mdx)&#62;
@@ -326,11 +346,11 @@ Promise&#60;[ReturnedData](../types/ReturnedData.mdx)&#62;
___
#### shouldRetryTransaction\_
### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -344,7 +364,7 @@ ___
}
]} />
##### Returns
#### Returns
`boolean`
@@ -362,11 +382,11 @@ ___
___
#### withTransaction
### withTransaction
`**withTransaction**(transactionManager?): [AbstractNotificationService](AbstractNotificationService.mdx)`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -380,7 +400,7 @@ ___
}
]} />
##### Returns
#### Returns
[AbstractNotificationService](AbstractNotificationService.mdx)
@@ -12,13 +12,11 @@ Payment processor in charge of creating , managing and processing a payment
- [PaymentProcessor](../interfaces/PaymentProcessor.mdx)
## Constructors
#### constructor
## constructor
`Protected **new AbstractPaymentProcessor**(container, config?)`
##### Parameters
### Parameters
<ParameterTypes parameters={[
{
@@ -41,6 +39,8 @@ Payment processor in charge of creating , managing and processing a payment
}
]} />
___
## Properties
<ParameterTypes parameters={[
@@ -73,15 +73,17 @@ 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 +106,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 +124,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 +144,7 @@ Cancel an existing session
}
]} />
##### Returns
#### Returns
Promise&#60;Record&#60;string, unknown&#62; \| [PaymentProcessorError](../interfaces/PaymentProcessorError.mdx)&#62;
@@ -160,13 +162,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 +182,7 @@ Capture an existing session
}
]} />
##### Returns
#### Returns
Promise&#60;Record&#60;string, unknown&#62; \| [PaymentProcessorError](../interfaces/PaymentProcessorError.mdx)&#62;
@@ -198,13 +200,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 +220,7 @@ Delete an existing session
}
]} />
##### Returns
#### Returns
Promise&#60;Record&#60;string, unknown&#62; \| [PaymentProcessorError](../interfaces/PaymentProcessorError.mdx)&#62;
@@ -236,13 +238,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 +262,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 +282,7 @@ Return the status of the session
}
]} />
##### Returns
#### Returns
Promise&#60;[PaymentSessionStatus](../enums/PaymentSessionStatus.mdx)&#62;
@@ -298,13 +300,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 +320,7 @@ Initiate a payment session with the external provider
}
]} />
##### Returns
#### Returns
Promise&#60;[PaymentProcessorError](../interfaces/PaymentProcessorError.mdx) \| [PaymentProcessorSessionResponse](../types/PaymentProcessorSessionResponse.mdx)&#62;
@@ -336,13 +338,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 +367,7 @@ Refund an existing session
}
]} />
##### Returns
#### Returns
Promise&#60;Record&#60;string, unknown&#62; \| [PaymentProcessorError](../interfaces/PaymentProcessorError.mdx)&#62;
@@ -383,13 +385,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 +405,7 @@ Retrieve an existing session
}
]} />
##### Returns
#### Returns
Promise&#60;Record&#60;string, unknown&#62; \| [PaymentProcessorError](../interfaces/PaymentProcessorError.mdx)&#62;
@@ -421,13 +423,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 +443,7 @@ Update an existing payment session
}
]} />
##### Returns
#### Returns
Promise&#60;void \| [PaymentProcessorError](../interfaces/PaymentProcessorError.mdx) \| [PaymentProcessorSessionResponse](../types/PaymentProcessorSessionResponse.mdx)&#62;
@@ -459,13 +461,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 +490,7 @@ Update the session data for a payment session
}
]} />
##### Returns
#### Returns
Promise&#60;Record&#60;string, unknown&#62; \| [PaymentProcessorError](../interfaces/PaymentProcessorError.mdx)&#62;
@@ -8,7 +8,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
This will be
#### Deprecated
## Deprecated
in the near future use the AbstractPaymentProcessor instead
@@ -16,13 +16,11 @@ in the near future use the AbstractPaymentProcessor instead
- ["medusa-interfaces"](../modules/medusa_interfaces_.mdx)
## Constructors
#### constructor
## constructor
`Protected **new AbstractPaymentService**(container, config?)`
##### Parameters
### Parameters
<ParameterTypes parameters={[
{
@@ -45,6 +43,8 @@ in the near future use the AbstractPaymentProcessor instead
}
]} />
___
## Properties
<ParameterTypes parameters={[
@@ -104,15 +104,35 @@ in the near future use the AbstractPaymentProcessor instead
}
]} />
___
## Accessors
#### activeManager\_
### activeManager\_
`Protected` **activeManager\_**: [object Object]
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
#### atomicPhase\_
### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -120,7 +140,7 @@ 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
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -143,7 +163,7 @@ transaction manager is created.
}
]} />
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -175,7 +195,7 @@ transaction manager is created.
}
]} />
##### Returns
#### Returns
Promise&#60;TResult&#62;
@@ -193,11 +213,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={[
{
@@ -220,7 +240,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;&#123; data: [Data](../types/Data.mdx) ; status: [PaymentSessionStatus](../enums/PaymentSessionStatus.mdx) &#125;&#62;
@@ -240,13 +260,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={[
{
@@ -260,7 +280,7 @@ This will be
}
]} />
##### Returns
#### Returns
Promise&#60;[Data](../types/Data.mdx)&#62;
@@ -282,13 +302,13 @@ in the near future
___
#### capturePayment
### capturePayment
`Abstract **capturePayment**(payment): Promise&#60;[Data](../types/Data.mdx)&#62;`
This will be
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -302,7 +322,7 @@ This will be
}
]} />
##### Returns
#### Returns
Promise&#60;[Data](../types/Data.mdx)&#62;
@@ -324,11 +344,11 @@ in the near future
___
#### createPayment
### createPayment
`Abstract **createPayment**(context): Promise&#60;[PaymentSessionResponse](../types/PaymentSessionResponse.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -342,7 +362,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[PaymentSessionResponse](../types/PaymentSessionResponse.mdx)&#62;
@@ -362,7 +382,7 @@ Promise&#60;[PaymentSessionResponse](../types/PaymentSessionResponse.mdx)&#62;
This will be
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -376,7 +396,7 @@ This will be
}
]} />
##### Returns
#### Returns
Promise&#60;[Data](../types/Data.mdx)&#62;
@@ -398,13 +418,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={[
{
@@ -418,7 +438,7 @@ This will be
}
]} />
##### Returns
#### Returns
Promise&#60;void&#62;
@@ -440,11 +460,11 @@ in the near future
___
#### getIdentifier
### getIdentifier
`**getIdentifier**(): string`
##### Returns
#### Returns
`string`
@@ -462,11 +482,11 @@ ___
___
#### getPaymentData
### getPaymentData
`Abstract **getPaymentData**(paymentSession): Promise&#60;[Data](../types/Data.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -480,7 +500,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[Data](../types/Data.mdx)&#62;
@@ -500,13 +520,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={[
{
@@ -520,7 +540,7 @@ This will be
}
]} />
##### Returns
#### Returns
Promise&#60;[PaymentSessionStatus](../enums/PaymentSessionStatus.mdx)&#62;
@@ -542,13 +562,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={[
{
@@ -571,7 +591,7 @@ This will be
}
]} />
##### Returns
#### Returns
Promise&#60;[Data](../types/Data.mdx)&#62;
@@ -593,11 +613,11 @@ in the near future
___
#### retrievePayment
### retrievePayment
`Abstract **retrievePayment**(paymentData): Promise&#60;[Data](../types/Data.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -611,7 +631,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[Data](../types/Data.mdx)&#62;
@@ -631,13 +651,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={[
{
@@ -651,7 +671,7 @@ This will be
}
]} />
##### Returns
#### Returns
Promise&#60;[Data](../types/Data.mdx)[]&#62;
@@ -673,11 +693,11 @@ in the near future
___
#### shouldRetryTransaction\_
### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -691,7 +711,7 @@ ___
}
]} />
##### Returns
#### Returns
`boolean`
@@ -709,11 +729,11 @@ ___
___
#### updatePayment
### updatePayment
`Abstract **updatePayment**(paymentSessionData, context): Promise&#60;Record&#60;string, unknown&#62; \| [PaymentSessionResponse](../types/PaymentSessionResponse.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -736,7 +756,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;Record&#60;string, unknown&#62; \| [PaymentSessionResponse](../types/PaymentSessionResponse.mdx)&#62;
@@ -756,7 +776,7 @@ Promise&#60;Record&#60;string, unknown&#62; \| [PaymentSessionResponse](../types
This will be
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -779,7 +799,7 @@ This will be
}
]} />
##### Returns
#### Returns
Promise&#60;[Data](../types/Data.mdx)&#62;
@@ -801,11 +821,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={[
{
@@ -828,7 +848,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[Data](../types/Data.mdx)&#62;
@@ -848,11 +868,11 @@ Promise&#60;[Data](../types/Data.mdx)&#62;
___
#### withTransaction
### withTransaction
`**withTransaction**(transactionManager?): [AbstractPaymentService](AbstractPaymentService.mdx)`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -866,7 +886,7 @@ ___
}
]} />
##### Returns
#### Returns
[AbstractPaymentService](AbstractPaymentService.mdx)
@@ -10,13 +10,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
- [ISearchService](../interfaces/ISearchService.mdx)
## Constructors
#### constructor
## constructor
`Protected **new AbstractSearchService**(container, options)`
##### Parameters
### Parameters
<ParameterTypes parameters={[
{
@@ -39,6 +37,8 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
}
]} />
___
## Properties
<ParameterTypes parameters={[
@@ -62,21 +62,41 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
}
]} />
___
## Accessors
#### options
### options
**options**: [object Object]
`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": []
}
]} />
___
## Methods
#### addDocuments
### addDocuments
`Abstract **addDocuments**(indexName, documents, type): unknown`
Used to index documents by the search engine provider
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -108,7 +128,7 @@ Used to index documents by the search engine provider
}
]} />
##### Returns
#### Returns
`unknown`
@@ -126,13 +146,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={[
{
@@ -155,7 +175,7 @@ Used to create an index
}
]} />
##### Returns
#### Returns
`unknown`
@@ -173,13 +193,13 @@ Used to create an index
___
#### deleteAllDocuments
### deleteAllDocuments
`Abstract **deleteAllDocuments**(indexName): unknown`
Used to delete all documents
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -193,7 +213,7 @@ Used to delete all documents
}
]} />
##### Returns
#### Returns
`unknown`
@@ -211,13 +231,13 @@ Used to delete all documents
___
#### deleteDocument
### deleteDocument
`Abstract **deleteDocument**(indexName, document_id): unknown`
Used to delete document
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -240,7 +260,7 @@ Used to delete document
}
]} />
##### Returns
#### Returns
`unknown`
@@ -258,13 +278,13 @@ Used to delete document
___
#### getIndex
### getIndex
`Abstract **getIndex**(indexName): unknown`
Used to get an index
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -278,7 +298,7 @@ Used to get an index
}
]} />
##### Returns
#### Returns
`unknown`
@@ -296,13 +316,13 @@ Used to get an index
___
#### replaceDocuments
### replaceDocuments
`Abstract **replaceDocuments**(indexName, documents, type): unknown`
Used to replace documents
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -334,7 +354,7 @@ Used to replace documents
}
]} />
##### Returns
#### Returns
`unknown`
@@ -352,13 +372,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={[
{
@@ -390,7 +410,7 @@ Used to search for a document in an index
}
]} />
##### Returns
#### Returns
`unknown`
@@ -408,13 +428,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={[
{
@@ -437,7 +457,7 @@ Used to update the settings of an index
}
]} />
##### Returns
#### Returns
`unknown`
@@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
An address is used across the Medusa backend within other schemas and object types. For example, a customer's billing and shipping addresses both use the Address entity.
## Constructors
#### constructor
## constructor
`**new Address**()`
An address is used across the Medusa backend within other schemas and object types. For example, a customer's billing and shipping addresses both use the Address entity.
___
## Properties
<ParameterTypes parameters={[
@@ -183,13 +183,15 @@ An address is used across the Medusa backend within other schemas and object typ
}
]} />
___
## Methods
#### beforeInsert
### beforeInsert
`Private **beforeInsert**(): void`
##### Returns
#### Returns
`void`
@@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
Address fields used when creating an address.
## Constructors
#### constructor
## constructor
`**new AddressCreatePayload**()`
Address fields used when creating an address.
___
## Properties
<ParameterTypes parameters={[
@@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
Address fields used when creating/updating an address.
## Constructors
#### constructor
## constructor
`**new AddressPayload**()`
Address fields used when creating/updating an address.
___
## Properties
<ParameterTypes parameters={[
@@ -8,12 +8,12 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
Filters to apply on discounts' rules.
## Constructors
#### constructor
## constructor
`**new AdminGetDiscountsDiscountRuleParams**()`
___
## Properties
<ParameterTypes parameters={[
@@ -6,12 +6,12 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
# AdminPriceListPricesCreateReq
## Constructors
#### constructor
## constructor
`**new AdminPriceListPricesCreateReq**()`
___
## Properties
<ParameterTypes parameters={[
@@ -6,12 +6,12 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
# AdminPriceListPricesUpdateReq
## Constructors
#### constructor
## constructor
`**new AdminPriceListPricesUpdateReq**()`
___
## Properties
<ParameterTypes parameters={[
@@ -8,12 +8,12 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
Base abstract entity for all entities
## Constructors
#### constructor
## constructor
`**new AnalyticsConfig**()`
___
## Properties
<ParameterTypes parameters={[
@@ -82,13 +82,15 @@ Base abstract entity for all entities
}
]} />
___
## Methods
#### beforeInsert
### beforeInsert
`Private **beforeInsert**(): void`
##### Returns
#### Returns
`void`
@@ -6,13 +6,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
# AnalyticsConfigService
## Constructors
#### constructor
## constructor
`**new AnalyticsConfigService**(«destructured»)`
##### Parameters
### Parameters
<ParameterTypes parameters={[
{
@@ -26,6 +24,8 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
}
]} />
___
## Properties
<ParameterTypes parameters={[
@@ -94,15 +94,35 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
}
]} />
___
## Accessors
#### activeManager\_
### activeManager\_
`Protected` **activeManager\_**: [object Object]
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
#### atomicPhase\_
### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -110,7 +130,7 @@ 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
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -133,7 +153,7 @@ transaction manager is created.
}
]} />
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -165,7 +185,7 @@ transaction manager is created.
}
]} />
##### Returns
#### Returns
Promise&#60;TResult&#62;
@@ -183,13 +203,13 @@ Promise&#60;TResult&#62;
___
#### create
### create
`**create**(userId, data): Promise&#60;[AnalyticsConfig](AnalyticsConfig.mdx)&#62;`
Creates an analytics config.
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -212,7 +232,7 @@ Creates an analytics config.
}
]} />
##### Returns
#### Returns
Promise&#60;[AnalyticsConfig](AnalyticsConfig.mdx)&#62;
@@ -230,13 +250,13 @@ Promise&#60;[AnalyticsConfig](AnalyticsConfig.mdx)&#62;
___
#### delete
### delete
`**delete**(userId): Promise&#60;void&#62;`
Deletes an analytics config.
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -250,7 +270,7 @@ Deletes an analytics config.
}
]} />
##### Returns
#### Returns
Promise&#60;void&#62;
@@ -268,11 +288,11 @@ Promise&#60;void&#62;
___
#### retrieve
### retrieve
`**retrieve**(userId): Promise&#60;[AnalyticsConfig](AnalyticsConfig.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -286,7 +306,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[AnalyticsConfig](AnalyticsConfig.mdx)&#62;
@@ -304,11 +324,11 @@ Promise&#60;[AnalyticsConfig](AnalyticsConfig.mdx)&#62;
___
#### shouldRetryTransaction\_
### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -322,7 +342,7 @@ ___
}
]} />
##### Returns
#### Returns
`boolean`
@@ -340,13 +360,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={[
{
@@ -369,7 +389,7 @@ Updates an analytics config. If the config does not exist, it will be created in
}
]} />
##### Returns
#### Returns
Promise&#60;[AnalyticsConfig](AnalyticsConfig.mdx)&#62;
@@ -387,11 +407,11 @@ Promise&#60;[AnalyticsConfig](AnalyticsConfig.mdx)&#62;
___
#### withTransaction
### withTransaction
`**withTransaction**(transactionManager?): [AnalyticsConfigService](AnalyticsConfigService.mdx)`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -405,7 +425,7 @@ ___
}
]} />
##### Returns
#### Returns
[AnalyticsConfigService](AnalyticsConfigService.mdx)
@@ -8,13 +8,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
Can authenticate a user based on email password combination
## Constructors
#### constructor
## constructor
`**new AuthService**(«destructured»)`
##### Parameters
### Parameters
<ParameterTypes parameters={[
{
@@ -28,6 +26,8 @@ Can authenticate a user based on email password combination
}
]} />
___
## Properties
<ParameterTypes parameters={[
@@ -96,15 +96,35 @@ Can authenticate a user based on email password combination
}
]} />
___
## Accessors
#### activeManager\_
### activeManager\_
`Protected` **activeManager\_**: [object Object]
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
#### atomicPhase\_
### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -112,7 +132,7 @@ 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
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -135,7 +155,7 @@ transaction manager is created.
}
]} />
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -167,7 +187,7 @@ transaction manager is created.
}
]} />
##### Returns
#### Returns
Promise&#60;TResult&#62;
@@ -185,14 +205,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={[
{
@@ -215,7 +235,7 @@ scrypt to match password with hashed value.
}
]} />
##### Returns
#### Returns
Promise&#60;[AuthenticateResult](../types/AuthenticateResult.mdx)&#62;
@@ -233,13 +253,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={[
{
@@ -253,7 +273,7 @@ Authenticates a given user with an API token
}
]} />
##### Returns
#### Returns
Promise&#60;[AuthenticateResult](../types/AuthenticateResult.mdx)&#62;
@@ -271,14 +291,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={[
{
@@ -301,7 +321,7 @@ scrypt to match password with hashed value.
}
]} />
##### Returns
#### Returns
Promise&#60;[AuthenticateResult](../types/AuthenticateResult.mdx)&#62;
@@ -319,13 +339,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={[
{
@@ -348,7 +368,7 @@ Verifies if a password is valid given the provided password hash
}
]} />
##### Returns
#### Returns
Promise&#60;boolean&#62;
@@ -366,11 +386,11 @@ Promise&#60;boolean&#62;
___
#### shouldRetryTransaction\_
### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -384,7 +404,7 @@ ___
}
]} />
##### Returns
#### Returns
`boolean`
@@ -402,11 +422,11 @@ ___
___
#### withTransaction
### withTransaction
`**withTransaction**(transactionManager?): [AuthService](AuthService.mdx)`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -420,7 +440,7 @@ ___
}
]} />
##### Returns
#### Returns
[AuthService](AuthService.mdx)
@@ -8,12 +8,12 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
Base abstract entity for all entities
## Constructors
#### constructor
## constructor
`**new BaseEntity**()`
___
## Properties
<ParameterTypes parameters={[
@@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
A Batch Job indicates an asynchronus task stored in the Medusa backend. Its status determines whether it has been executed or not.
## Constructors
#### constructor
## constructor
`**new BatchJob**()`
A Batch Job indicates an asynchronus task stored in the Medusa backend. Its status determines whether it has been executed or not.
___
## Properties
<ParameterTypes parameters={[
@@ -174,13 +174,15 @@ 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 +200,11 @@ A Batch Job indicates an asynchronus task stored in the Medusa backend. Its stat
___
#### loadStatus
### loadStatus
`**loadStatus**(): void`
##### Returns
#### Returns
`void`
@@ -220,13 +222,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)
@@ -6,13 +6,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
# BatchJobService
## Constructors
#### constructor
## constructor
`**new BatchJobService**(«destructured»)`
##### Parameters
### Parameters
<ParameterTypes parameters={[
{
@@ -26,6 +24,8 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
}
]} />
___
## Properties
<ParameterTypes parameters={[
@@ -193,15 +193,35 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
}
]} />
___
## Accessors
#### activeManager\_
### activeManager\_
`Protected` **activeManager\_**: [object Object]
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
#### atomicPhase\_
### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -209,7 +229,7 @@ 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
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -232,7 +252,7 @@ transaction manager is created.
}
]} />
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -264,7 +284,7 @@ transaction manager is created.
}
]} />
##### Returns
#### Returns
Promise&#60;TResult&#62;
@@ -282,11 +302,11 @@ Promise&#60;TResult&#62;
___
#### cancel
### cancel
`**cancel**(batchJobOrId): Promise&#60;[BatchJob](BatchJob.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -300,7 +320,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[BatchJob](BatchJob.mdx)&#62;
@@ -318,11 +338,11 @@ Promise&#60;[BatchJob](BatchJob.mdx)&#62;
___
#### complete
### complete
`**complete**(batchJobOrId): Promise&#60;[BatchJob](BatchJob.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -336,7 +356,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[BatchJob](BatchJob.mdx)&#62;
@@ -354,11 +374,11 @@ Promise&#60;[BatchJob](BatchJob.mdx)&#62;
___
#### confirm
### confirm
`**confirm**(batchJobOrId): Promise&#60;[BatchJob](BatchJob.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -372,7 +392,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[BatchJob](BatchJob.mdx)&#62;
@@ -390,11 +410,11 @@ Promise&#60;[BatchJob](BatchJob.mdx)&#62;
___
#### create
### create
`**create**(data): Promise&#60;[BatchJob](BatchJob.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -408,7 +428,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[BatchJob](BatchJob.mdx)&#62;
@@ -426,11 +446,11 @@ Promise&#60;[BatchJob](BatchJob.mdx)&#62;
___
#### listAndCount
### listAndCount
`**listAndCount**(selector?, config?): Promise&#60;[[BatchJob](BatchJob.mdx)[], number]&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -453,7 +473,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[[BatchJob](BatchJob.mdx)[], number]&#62;
@@ -471,11 +491,11 @@ Promise&#60;[[BatchJob](BatchJob.mdx)[], number]&#62;
___
#### prepareBatchJobForProcessing
### prepareBatchJobForProcessing
`**prepareBatchJobForProcessing**(data, req): Promise&#60;[CreateBatchJobInput](../types/CreateBatchJobInput.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -498,7 +518,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[CreateBatchJobInput](../types/CreateBatchJobInput.mdx)&#62;
@@ -516,11 +536,11 @@ Promise&#60;[CreateBatchJobInput](../types/CreateBatchJobInput.mdx)&#62;
___
#### retrieve
### retrieve
`**retrieve**(batchJobId, config?): Promise&#60;[BatchJob](BatchJob.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -543,7 +563,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[BatchJob](BatchJob.mdx)&#62;
@@ -561,11 +581,11 @@ Promise&#60;[BatchJob](BatchJob.mdx)&#62;
___
#### setFailed
### setFailed
`**setFailed**(batchJobOrId, error?): Promise&#60;[BatchJob](BatchJob.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -588,7 +608,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[BatchJob](BatchJob.mdx)&#62;
@@ -606,11 +626,11 @@ Promise&#60;[BatchJob](BatchJob.mdx)&#62;
___
#### setPreProcessingDone
### setPreProcessingDone
`**setPreProcessingDone**(batchJobOrId): Promise&#60;[BatchJob](BatchJob.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -624,7 +644,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[BatchJob](BatchJob.mdx)&#62;
@@ -642,11 +662,11 @@ Promise&#60;[BatchJob](BatchJob.mdx)&#62;
___
#### setProcessing
### setProcessing
`**setProcessing**(batchJobOrId): Promise&#60;[BatchJob](BatchJob.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -660,7 +680,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[BatchJob](BatchJob.mdx)&#62;
@@ -678,11 +698,11 @@ Promise&#60;[BatchJob](BatchJob.mdx)&#62;
___
#### shouldRetryTransaction\_
### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -696,7 +716,7 @@ ___
}
]} />
##### Returns
#### Returns
`boolean`
@@ -714,11 +734,11 @@ ___
___
#### update
### update
`**update**(batchJobOrId, data): Promise&#60;[BatchJob](BatchJob.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -741,7 +761,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[BatchJob](BatchJob.mdx)&#62;
@@ -759,11 +779,11 @@ Promise&#60;[BatchJob](BatchJob.mdx)&#62;
___
#### updateStatus
### updateStatus
`Protected **updateStatus**(batchJobOrId, status): Promise&#60;[BatchJob](BatchJob.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -786,7 +806,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[BatchJob](BatchJob.mdx)&#62;
@@ -804,11 +824,11 @@ Promise&#60;[BatchJob](BatchJob.mdx)&#62;
___
#### withTransaction
### withTransaction
`**withTransaction**(transactionManager?): [BatchJobService](BatchJobService.mdx)`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -822,7 +842,7 @@ ___
}
]} />
##### Returns
#### Returns
[BatchJobService](BatchJobService.mdx)
@@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
A cart represents a virtual shopping bag. It can be used to complete an order, a swap, or a claim.
## Constructors
#### constructor
## constructor
`**new Cart**()`
A cart represents a virtual shopping bag. It can be used to complete an order, a swap, or a claim.
___
## Properties
<ParameterTypes parameters={[
@@ -399,13 +399,15 @@ 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 +425,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
@@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
The details of an image attached to a claim.
## Constructors
#### constructor
## constructor
`**new ClaimImage**()`
The details of an image attached to a claim.
___
## Properties
<ParameterTypes parameters={[
@@ -93,13 +93,15 @@ The details of an image attached to a claim.
}
]} />
___
## Methods
#### beforeInsert
### beforeInsert
`Private **beforeInsert**(): void`
##### Returns
#### Returns
`void`
@@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
A claim item is an item created as part of a claim. It references an item in the order that should be exchanged or refunded.
## Constructors
#### constructor
## constructor
`**new ClaimItem**()`
A claim item is an item created as part of a claim. It references an item in the order that should be exchanged or refunded.
___
## Properties
<ParameterTypes parameters={[
@@ -165,13 +165,15 @@ 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`
@@ -6,13 +6,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
# ClaimItemService
## Constructors
#### constructor
## constructor
`**new ClaimItemService**(«destructured»)`
##### Parameters
### Parameters
<ParameterTypes parameters={[
{
@@ -26,6 +24,8 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
}
]} />
___
## Properties
<ParameterTypes parameters={[
@@ -157,15 +157,35 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
}
]} />
___
## Accessors
#### activeManager\_
### activeManager\_
`Protected` **activeManager\_**: [object Object]
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
#### atomicPhase\_
### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -173,7 +193,7 @@ 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
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -196,7 +216,7 @@ transaction manager is created.
}
]} />
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -228,7 +248,7 @@ transaction manager is created.
}
]} />
##### Returns
#### Returns
Promise&#60;TResult&#62;
@@ -246,11 +266,11 @@ Promise&#60;TResult&#62;
___
#### create
### create
`**create**(data): Promise&#60;[ClaimItem](ClaimItem.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -264,7 +284,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[ClaimItem](ClaimItem.mdx)&#62;
@@ -282,11 +302,11 @@ Promise&#60;[ClaimItem](ClaimItem.mdx)&#62;
___
#### list
### list
`**list**(selector, config?): Promise&#60;[ClaimItem](ClaimItem.mdx)[]&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -309,7 +329,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[ClaimItem](ClaimItem.mdx)[]&#62;
@@ -327,13 +347,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={[
{
@@ -356,7 +376,7 @@ Gets a claim item by id.
}
]} />
##### Returns
#### Returns
Promise&#60;[ClaimItem](ClaimItem.mdx)&#62;
@@ -374,11 +394,11 @@ Promise&#60;[ClaimItem](ClaimItem.mdx)&#62;
___
#### shouldRetryTransaction\_
### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -392,7 +412,7 @@ ___
}
]} />
##### Returns
#### Returns
`boolean`
@@ -410,11 +430,11 @@ ___
___
#### update
### update
`**update**(id, data): Promise&#60;[ClaimItem](ClaimItem.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -437,7 +457,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[ClaimItem](ClaimItem.mdx)&#62;
@@ -455,11 +475,11 @@ Promise&#60;[ClaimItem](ClaimItem.mdx)&#62;
___
#### withTransaction
### withTransaction
`**withTransaction**(transactionManager?): [ClaimItemService](ClaimItemService.mdx)`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -473,7 +493,7 @@ ___
}
]} />
##### Returns
#### Returns
[ClaimItemService](ClaimItemService.mdx)
@@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
A Claim represents a group of faulty or missing items. It consists of claim items that refer to items in the original order that should be replaced or refunded. It also includes details related to shipping and fulfillment.
## Constructors
#### constructor
## constructor
`**new ClaimOrder**()`
A Claim represents a group of faulty or missing items. It consists of claim items that refer to items in the original order that should be replaced or refunded. It also includes details related to shipping and fulfillment.
___
## Properties
<ParameterTypes parameters={[
@@ -210,13 +210,15 @@ A Claim represents a group of faulty or missing items. It consists of claim item
}
]} />
___
## Methods
#### beforeInsert
### beforeInsert
`Private **beforeInsert**(): void`
##### Returns
#### Returns
`void`
@@ -6,13 +6,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
# ClaimService
## Constructors
#### constructor
## constructor
`**new ClaimService**(«destructured»)`
##### Parameters
### Parameters
<ParameterTypes parameters={[
{
@@ -26,6 +24,8 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
}
]} />
___
## Properties
<ParameterTypes parameters={[
@@ -283,15 +283,35 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
}
]} />
___
## Accessors
#### activeManager\_
### activeManager\_
`Protected` **activeManager\_**: [object Object]
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
#### atomicPhase\_
### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -299,7 +319,7 @@ 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
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -322,7 +342,7 @@ transaction manager is created.
}
]} />
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -354,7 +374,7 @@ transaction manager is created.
}
]} />
##### Returns
#### Returns
Promise&#60;TResult&#62;
@@ -372,11 +392,11 @@ Promise&#60;TResult&#62;
___
#### cancel
### cancel
`**cancel**(id): Promise&#60;[ClaimOrder](ClaimOrder.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -390,7 +410,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[ClaimOrder](ClaimOrder.mdx)&#62;
@@ -408,11 +428,11 @@ Promise&#60;[ClaimOrder](ClaimOrder.mdx)&#62;
___
#### cancelFulfillment
### cancelFulfillment
`**cancelFulfillment**(fulfillmentId): Promise&#60;[ClaimOrder](ClaimOrder.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -426,7 +446,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[ClaimOrder](ClaimOrder.mdx)&#62;
@@ -444,7 +464,7 @@ Promise&#60;[ClaimOrder](ClaimOrder.mdx)&#62;
___
#### create
### create
`**create**(data): Promise&#60;[ClaimOrder](ClaimOrder.mdx)&#62;`
@@ -452,7 +472,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={[
{
@@ -466,7 +486,7 @@ shipping address that the new items will be shipped to
}
]} />
##### Returns
#### Returns
Promise&#60;[ClaimOrder](ClaimOrder.mdx)&#62;
@@ -484,11 +504,11 @@ Promise&#60;[ClaimOrder](ClaimOrder.mdx)&#62;
___
#### createFulfillment
### createFulfillment
`**createFulfillment**(id, config?): Promise&#60;[ClaimOrder](ClaimOrder.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -538,7 +558,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[ClaimOrder](ClaimOrder.mdx)&#62;
@@ -556,11 +576,11 @@ Promise&#60;[ClaimOrder](ClaimOrder.mdx)&#62;
___
#### createShipment
### createShipment
`**createShipment**(id, fulfillmentId, trackingLinks?, config?): Promise&#60;[ClaimOrder](ClaimOrder.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -619,7 +639,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[ClaimOrder](ClaimOrder.mdx)&#62;
@@ -637,7 +657,7 @@ Promise&#60;[ClaimOrder](ClaimOrder.mdx)&#62;
___
#### getRefundTotalForClaimLinesOnOrder
### getRefundTotalForClaimLinesOnOrder
`Protected **getRefundTotalForClaimLinesOnOrder**(order, claimItems): Promise&#60;number&#62;`
@@ -648,7 +668,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={[
{
@@ -671,7 +691,7 @@ Note, it will attempt to return early from each of these places to avoid having
}
]} />
##### Returns
#### Returns
Promise&#60;number&#62;
@@ -689,11 +709,11 @@ Promise&#60;number&#62;
___
#### list
### list
`**list**(selector, config?): Promise&#60;[ClaimOrder](ClaimOrder.mdx)[]&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -716,7 +736,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[ClaimOrder](ClaimOrder.mdx)[]&#62;
@@ -734,11 +754,11 @@ Promise&#60;[ClaimOrder](ClaimOrder.mdx)[]&#62;
___
#### processRefund
### processRefund
`**processRefund**(id): Promise&#60;[ClaimOrder](ClaimOrder.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -752,7 +772,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[ClaimOrder](ClaimOrder.mdx)&#62;
@@ -770,13 +790,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={[
{
@@ -799,7 +819,7 @@ Gets an order by id.
}
]} />
##### Returns
#### Returns
Promise&#60;[ClaimOrder](ClaimOrder.mdx)&#62;
@@ -817,11 +837,11 @@ Promise&#60;[ClaimOrder](ClaimOrder.mdx)&#62;
___
#### shouldRetryTransaction\_
### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -835,7 +855,7 @@ ___
}
]} />
##### Returns
#### Returns
`boolean`
@@ -853,11 +873,11 @@ ___
___
#### update
### update
`**update**(id, data): Promise&#60;[ClaimOrder](ClaimOrder.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -880,7 +900,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[ClaimOrder](ClaimOrder.mdx)&#62;
@@ -898,11 +918,11 @@ Promise&#60;[ClaimOrder](ClaimOrder.mdx)&#62;
___
#### validateCreateClaimInput
### validateCreateClaimInput
`Protected **validateCreateClaimInput**(data): Promise&#60;void&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -916,7 +936,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;void&#62;
@@ -934,11 +954,11 @@ Promise&#60;void&#62;
___
#### withTransaction
### withTransaction
`**withTransaction**(transactionManager?): [ClaimService](ClaimService.mdx)`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -952,7 +972,7 @@ ___
}
]} />
##### Returns
#### Returns
[ClaimService](ClaimService.mdx)
@@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
Claim Tags are user defined tags that can be assigned to claim items for easy filtering and grouping.
## Constructors
#### constructor
## constructor
`**new ClaimTag**()`
Claim Tags are user defined tags that can be assigned to claim items for easy filtering and grouping.
___
## Properties
<ParameterTypes parameters={[
@@ -75,13 +75,15 @@ 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`
@@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
Country details
## Constructors
#### constructor
## constructor
`**new Country**()`
Country details
___
## Properties
<ParameterTypes parameters={[
@@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
Currency
## Constructors
#### constructor
## constructor
`**new Currency**()`
Currency
___
## Properties
<ParameterTypes parameters={[
@@ -6,13 +6,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
# CurrencyService
## Constructors
#### constructor
## constructor
`**new CurrencyService**(«destructured»)`
##### Parameters
### Parameters
<ParameterTypes parameters={[
{
@@ -26,6 +24,8 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
}
]} />
___
## Properties
<ParameterTypes parameters={[
@@ -121,15 +121,35 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
}
]} />
___
## Accessors
#### activeManager\_
### activeManager\_
`Protected` **activeManager\_**: [object Object]
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
#### atomicPhase\_
### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -137,7 +157,7 @@ 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
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -160,7 +180,7 @@ transaction manager is created.
}
]} />
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -192,7 +212,7 @@ transaction manager is created.
}
]} />
##### Returns
#### Returns
Promise&#60;TResult&#62;
@@ -210,14 +230,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={[
{
@@ -240,7 +260,7 @@ currencies that match the query.
}
]} />
##### Returns
#### Returns
Promise&#60;[[Currency](Currency.mdx)[], number]&#62;
@@ -258,13 +278,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={[
{
@@ -278,7 +298,7 @@ Return the currency
}
]} />
##### Returns
#### Returns
Promise&#60;[Currency](Currency.mdx)&#62;
@@ -296,11 +316,11 @@ Promise&#60;[Currency](Currency.mdx)&#62;
___
#### shouldRetryTransaction\_
### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -314,7 +334,7 @@ ___
}
]} />
##### Returns
#### Returns
`boolean`
@@ -332,13 +352,13 @@ ___
___
#### update
### update
`**update**(code, data): Promise&#60;undefined \| [Currency](Currency.mdx)&#62;`
Update a currency
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -361,7 +381,7 @@ Update a currency
}
]} />
##### Returns
#### Returns
Promise&#60;undefined \| [Currency](Currency.mdx)&#62;
@@ -379,11 +399,11 @@ Promise&#60;undefined \| [Currency](Currency.mdx)&#62;
___
#### withTransaction
### withTransaction
`**withTransaction**(transactionManager?): [CurrencyService](CurrencyService.mdx)`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -397,7 +417,7 @@ ___
}
]} />
##### Returns
#### Returns
[CurrencyService](CurrencyService.mdx)
@@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
Custom Shipping Options are overridden Shipping Options. Admins can attach a Custom Shipping Option to a cart in order to set a custom price for a particular Shipping Option.
## Constructors
#### constructor
## constructor
`**new CustomShippingOption**()`
Custom Shipping Options are overridden Shipping Options. Admins can attach a Custom Shipping Option to a cart in order to set a custom price for a particular Shipping Option.
___
## Properties
<ParameterTypes parameters={[
@@ -111,13 +111,15 @@ Custom Shipping Options are overridden Shipping Options. Admins can attach a Cus
}
]} />
___
## Methods
#### beforeInsert
### beforeInsert
`Private **beforeInsert**(): void`
##### Returns
#### Returns
`void`
@@ -6,13 +6,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
# CustomShippingOptionService
## Constructors
#### constructor
## constructor
`**new CustomShippingOptionService**(«destructured»)`
##### Parameters
### Parameters
<ParameterTypes parameters={[
{
@@ -26,6 +24,8 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
}
]} />
___
## Properties
<ParameterTypes parameters={[
@@ -85,15 +85,35 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
}
]} />
___
## Accessors
#### activeManager\_
### activeManager\_
`Protected` **activeManager\_**: [object Object]
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
#### atomicPhase\_
### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -101,7 +121,7 @@ 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
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -124,7 +144,7 @@ transaction manager is created.
}
]} />
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -156,7 +176,7 @@ transaction manager is created.
}
]} />
##### Returns
#### Returns
Promise&#60;TResult&#62;
@@ -174,13 +194,13 @@ Promise&#60;TResult&#62;
___
#### create
### create
`**create**<TypeParameter T, TypeParameter TResult>(data): Promise&#60;TResult&#62;`
Creates a custom shipping option
##### Type Parameters
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -203,7 +223,7 @@ Creates a custom shipping option
}
]} />
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -217,7 +237,7 @@ Creates a custom shipping option
}
]} />
##### Returns
#### Returns
Promise&#60;TResult&#62;
@@ -235,13 +255,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={[
{
@@ -264,7 +284,7 @@ Fetches all custom shipping options based on the given selector
}
]} />
##### Returns
#### Returns
Promise&#60;[CustomShippingOption](CustomShippingOption.mdx)[]&#62;
@@ -282,13 +302,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={[
{
@@ -311,7 +331,7 @@ Retrieves a specific shipping option.
}
]} />
##### Returns
#### Returns
Promise&#60;[CustomShippingOption](CustomShippingOption.mdx)&#62;
@@ -329,11 +349,11 @@ Promise&#60;[CustomShippingOption](CustomShippingOption.mdx)&#62;
___
#### shouldRetryTransaction\_
### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -347,7 +367,7 @@ ___
}
]} />
##### Returns
#### Returns
`boolean`
@@ -365,11 +385,11 @@ ___
___
#### withTransaction
### withTransaction
`**withTransaction**(transactionManager?): [CustomShippingOptionService](CustomShippingOptionService.mdx)`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -383,7 +403,7 @@ ___
}
]} />
##### Returns
#### Returns
[CustomShippingOptionService](CustomShippingOptionService.mdx)
@@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
A customer can make purchases in your store and manage their profile.
## Constructors
#### constructor
## constructor
`**new Customer**()`
A customer can make purchases in your store and manage their profile.
___
## Properties
<ParameterTypes parameters={[
@@ -165,13 +165,15 @@ A customer can make purchases in your store and manage their profile.
}
]} />
___
## Methods
#### beforeInsert
### beforeInsert
`Private **beforeInsert**(): void`
##### Returns
#### Returns
`void`
@@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
A customer group that can be used to organize customers into groups of similar traits.
## Constructors
#### constructor
## constructor
`**new CustomerGroup**()`
A customer group that can be used to organize customers into groups of similar traits.
___
## Properties
<ParameterTypes parameters={[
@@ -93,13 +93,15 @@ A customer group that can be used to organize customers into groups of similar t
}
]} />
___
## Methods
#### beforeInsert
### beforeInsert
`Private **beforeInsert**(): void`
##### Returns
#### Returns
`void`
@@ -6,13 +6,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
# CustomerGroupService
## Constructors
#### constructor
## constructor
`**new CustomerGroupService**(«destructured»)`
##### Parameters
### Parameters
<ParameterTypes parameters={[
{
@@ -26,6 +24,8 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
}
]} />
___
## Properties
<ParameterTypes parameters={[
@@ -94,21 +94,41 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
}
]} />
___
## Accessors
#### activeManager\_
### activeManager\_
`Protected` **activeManager\_**: [object Object]
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
## 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={[
{
@@ -131,7 +151,7 @@ Add a batch of customers to a customer group at once
}
]} />
##### Returns
#### Returns
Promise&#60;[CustomerGroup](CustomerGroup.mdx)&#62;
@@ -149,7 +169,7 @@ Promise&#60;[CustomerGroup](CustomerGroup.mdx)&#62;
___
#### atomicPhase\_
### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -157,7 +177,7 @@ 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
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -180,7 +200,7 @@ transaction manager is created.
}
]} />
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -212,7 +232,7 @@ transaction manager is created.
}
]} />
##### Returns
#### Returns
Promise&#60;TResult&#62;
@@ -230,13 +250,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={[
{
@@ -250,7 +270,7 @@ Creates a customer group with the provided data.
}
]} />
##### Returns
#### Returns
Promise&#60;[CustomerGroup](CustomerGroup.mdx)&#62;
@@ -268,13 +288,13 @@ Promise&#60;[CustomerGroup](CustomerGroup.mdx)&#62;
___
#### delete
### delete
`**delete**(groupId): Promise&#60;void&#62;`
Remove customer group
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -288,7 +308,7 @@ Remove customer group
}
]} />
##### Returns
#### Returns
Promise&#60;void&#62;
@@ -306,11 +326,11 @@ Promise&#60;void&#62;
___
#### handleCreationFail
### handleCreationFail
`Private **handleCreationFail**(id, ids, error): Promise&#60;never&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -342,7 +362,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;never&#62;
@@ -360,13 +380,13 @@ Promise&#60;never&#62;
___
#### list
### list
`**list**(selector?, config): Promise&#60;[CustomerGroup](CustomerGroup.mdx)[]&#62;`
List customer groups.
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -389,7 +409,7 @@ List customer groups.
}
]} />
##### Returns
#### Returns
Promise&#60;[CustomerGroup](CustomerGroup.mdx)[]&#62;
@@ -407,13 +427,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={[
{
@@ -436,7 +456,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;
@@ -454,13 +474,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={[
{
@@ -483,7 +503,7 @@ Remove list of customers from a customergroup
}
]} />
##### Returns
#### Returns
Promise&#60;[CustomerGroup](CustomerGroup.mdx)&#62;
@@ -501,11 +521,11 @@ Promise&#60;[CustomerGroup](CustomerGroup.mdx)&#62;
___
#### retrieve
### retrieve
`**retrieve**(customerGroupId, config?): Promise&#60;[CustomerGroup](CustomerGroup.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -528,7 +548,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[CustomerGroup](CustomerGroup.mdx)&#62;
@@ -546,11 +566,11 @@ Promise&#60;[CustomerGroup](CustomerGroup.mdx)&#62;
___
#### shouldRetryTransaction\_
### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -564,7 +584,7 @@ ___
}
]} />
##### Returns
#### Returns
`boolean`
@@ -582,13 +602,13 @@ ___
___
#### update
### update
`**update**(customerGroupId, update): Promise&#60;[CustomerGroup](CustomerGroup.mdx)&#62;`
Update a customer group.
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -611,7 +631,7 @@ Update a customer group.
}
]} />
##### Returns
#### Returns
Promise&#60;[CustomerGroup](CustomerGroup.mdx)&#62;
@@ -629,11 +649,11 @@ Promise&#60;[CustomerGroup](CustomerGroup.mdx)&#62;
___
#### withTransaction
### withTransaction
`**withTransaction**(transactionManager?): [CustomerGroupService](CustomerGroupService.mdx)`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -647,7 +667,7 @@ ___
}
]} />
##### Returns
#### Returns
[CustomerGroupService](CustomerGroupService.mdx)
@@ -6,12 +6,12 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
# CustomerGroupUpdate
## Constructors
#### constructor
## constructor
`**new CustomerGroupUpdate**()`
___
## Properties
<ParameterTypes parameters={[
@@ -8,13 +8,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
Provides layer to manipulate customers.
## Constructors
#### constructor
## constructor
`**new CustomerService**(«destructured»)`
##### Parameters
### Parameters
<ParameterTypes parameters={[
{
@@ -28,6 +26,8 @@ Provides layer to manipulate customers.
}
]} />
___
## Properties
<ParameterTypes parameters={[
@@ -141,19 +141,39 @@ Provides layer to manipulate customers.
}
]} />
___
## Accessors
#### activeManager\_
### activeManager\_
`Protected` **activeManager\_**: [object Object]
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
#### addAddress
### addAddress
`**addAddress**(customerId, address): Promise&#60;[Customer](Customer.mdx) \| [Address](Address.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -176,7 +196,7 @@ Provides layer to manipulate customers.
}
]} />
##### Returns
#### Returns
Promise&#60;[Customer](Customer.mdx) \| [Address](Address.mdx)&#62;
@@ -194,7 +214,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;`
@@ -202,7 +222,7 @@ 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
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -225,7 +245,7 @@ transaction manager is created.
}
]} />
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -257,7 +277,7 @@ transaction manager is created.
}
]} />
##### Returns
#### Returns
Promise&#60;TResult&#62;
@@ -275,13 +295,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;
@@ -299,7 +319,7 @@ Promise&#60;number&#62;
___
#### create
### create
`**create**(customer): Promise&#60;[Customer](Customer.mdx)&#62;`
@@ -308,7 +328,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={[
{
@@ -322,7 +342,7 @@ used to hold details of customers.
}
]} />
##### Returns
#### Returns
Promise&#60;[Customer](Customer.mdx)&#62;
@@ -340,13 +360,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={[
{
@@ -360,7 +380,7 @@ Deletes a customer from a given customer id.
}
]} />
##### Returns
#### Returns
Promise&#60;void \| [Customer](Customer.mdx)&#62;
@@ -378,7 +398,7 @@ Promise&#60;void \| [Customer](Customer.mdx)&#62;
___
#### generateResetPasswordToken
### generateResetPasswordToken
`**generateResetPasswordToken**(customerId): Promise&#60;string&#62;`
@@ -388,7 +408,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={[
{
@@ -402,7 +422,7 @@ which is always 15 minutes.
}
]} />
##### Returns
#### Returns
Promise&#60;string&#62;
@@ -420,13 +440,13 @@ Promise&#60;string&#62;
___
#### hashPassword\_
### hashPassword\_
`**hashPassword_**(password): Promise&#60;string&#62;`
Hashes a password
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -440,7 +460,7 @@ Hashes a password
}
]} />
##### Returns
#### Returns
Promise&#60;string&#62;
@@ -458,11 +478,11 @@ Promise&#60;string&#62;
___
#### list
### list
`**list**(selector?, config?): Promise&#60;[Customer](Customer.mdx)[]&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -485,7 +505,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[Customer](Customer.mdx)[]&#62;
@@ -503,11 +523,11 @@ Promise&#60;[Customer](Customer.mdx)[]&#62;
___
#### listAndCount
### listAndCount
`**listAndCount**(selector, config?): Promise&#60;[[Customer](Customer.mdx)[], number]&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -530,7 +550,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[[Customer](Customer.mdx)[], number]&#62;
@@ -548,11 +568,11 @@ Promise&#60;[[Customer](Customer.mdx)[], number]&#62;
___
#### listByEmail
### listByEmail
`**listByEmail**(email, config?): Promise&#60;[Customer](Customer.mdx)[]&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -575,7 +595,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[Customer](Customer.mdx)[]&#62;
@@ -593,11 +613,11 @@ Promise&#60;[Customer](Customer.mdx)[]&#62;
___
#### removeAddress
### removeAddress
`**removeAddress**(customerId, addressId): Promise&#60;void&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -620,7 +640,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;void&#62;
@@ -638,13 +658,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={[
{
@@ -667,7 +687,7 @@ Gets a customer by id.
}
]} />
##### Returns
#### Returns
Promise&#60;[Customer](Customer.mdx)&#62;
@@ -685,13 +705,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={[
{
@@ -714,7 +734,7 @@ Gets a registered customer by email.
}
]} />
##### Returns
#### Returns
Promise&#60;[Customer](Customer.mdx)&#62;
@@ -734,13 +754,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={[
{
@@ -763,7 +783,7 @@ Gets a customer by phone.
}
]} />
##### Returns
#### Returns
Promise&#60;[Customer](Customer.mdx)&#62;
@@ -781,11 +801,11 @@ Promise&#60;[Customer](Customer.mdx)&#62;
___
#### retrieveRegisteredByEmail
### retrieveRegisteredByEmail
`**retrieveRegisteredByEmail**(email, config?): Promise&#60;[Customer](Customer.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -808,7 +828,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[Customer](Customer.mdx)&#62;
@@ -826,11 +846,11 @@ Promise&#60;[Customer](Customer.mdx)&#62;
___
#### retrieveUnregisteredByEmail
### retrieveUnregisteredByEmail
`**retrieveUnregisteredByEmail**(email, config?): Promise&#60;[Customer](Customer.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -853,7 +873,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[Customer](Customer.mdx)&#62;
@@ -871,11 +891,11 @@ Promise&#60;[Customer](Customer.mdx)&#62;
___
#### retrieve\_
### retrieve\_
`Private **retrieve_**(selector, config?): Promise&#60;[Customer](Customer.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -898,7 +918,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[Customer](Customer.mdx)&#62;
@@ -916,11 +936,11 @@ Promise&#60;[Customer](Customer.mdx)&#62;
___
#### shouldRetryTransaction\_
### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -934,7 +954,7 @@ ___
}
]} />
##### Returns
#### Returns
`boolean`
@@ -952,13 +972,13 @@ ___
___
#### update
### update
`**update**(customerId, update): Promise&#60;[Customer](Customer.mdx)&#62;`
Updates a customer.
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -981,7 +1001,7 @@ Updates a customer.
}
]} />
##### Returns
#### Returns
Promise&#60;[Customer](Customer.mdx)&#62;
@@ -999,11 +1019,11 @@ Promise&#60;[Customer](Customer.mdx)&#62;
___
#### updateAddress
### updateAddress
`**updateAddress**(customerId, addressId, address): Promise&#60;[Address](Address.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -1035,7 +1055,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[Address](Address.mdx)&#62;
@@ -1053,13 +1073,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={[
{
@@ -1082,7 +1102,7 @@ Updates the customers' billing address.
}
]} />
##### Returns
#### Returns
Promise&#60;void&#62;
@@ -1100,11 +1120,11 @@ Promise&#60;void&#62;
___
#### withTransaction
### withTransaction
`**withTransaction**(transactionManager?): [CustomerService](CustomerService.mdx)`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -1118,7 +1138,7 @@ ___
}
]} />
##### Returns
#### Returns
[CustomerService](CustomerService.mdx)
@@ -8,12 +8,12 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
Fields used to apply flexible filters on dates.
## Constructors
#### constructor
## constructor
`**new DateComparisonOperator**()`
___
## Properties
<ParameterTypes parameters={[
@@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
A discount can be applied to a cart for promotional purposes.
## Constructors
#### constructor
## constructor
`**new Discount**()`
A discount can be applied to a cart for promotional purposes.
___
## Properties
<ParameterTypes parameters={[
@@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
A discount can be applied to a cart for promotional purposes.
## Constructors
#### constructor
## constructor
`**new Discount**()`
A discount can be applied to a cart for promotional purposes.
___
## Properties
<ParameterTypes parameters={[
@@ -183,13 +183,15 @@ A discount can be applied to a cart for promotional purposes.
}
]} />
___
## Methods
#### upperCaseCodeAndTrim
### upperCaseCodeAndTrim
`Private **upperCaseCodeAndTrim**(): void`
##### Returns
#### Returns
`void`
@@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
Holds rule conditions for when a discount is applicable
## Constructors
#### constructor
## constructor
`**new DiscountCondition**()`
Holds rule conditions for when a discount is applicable
___
## Properties
<ParameterTypes parameters={[
@@ -147,13 +147,15 @@ Holds rule conditions for when a discount is applicable
}
]} />
___
## Methods
#### beforeInsert
### beforeInsert
`Private **beforeInsert**(): void`
##### Returns
#### Returns
`void`
@@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
Associates a discount condition with a customer group
## Constructors
#### constructor
## constructor
`**new DiscountConditionCustomerGroup**()`
Associates a discount condition with a customer group
___
## Properties
<ParameterTypes parameters={[
@@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
This represents the association between a discount condition and a product
## Constructors
#### constructor
## constructor
`**new DiscountConditionProduct**()`
This represents the association between a discount condition and a product
___
## Properties
<ParameterTypes parameters={[
@@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
This represents the association between a discount condition and a product collection
## Constructors
#### constructor
## constructor
`**new DiscountConditionProductCollection**()`
This represents the association between a discount condition and a product collection
___
## Properties
<ParameterTypes parameters={[
@@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
This represents the association between a discount condition and a product tag
## Constructors
#### constructor
## constructor
`**new DiscountConditionProductTag**()`
This represents the association between a discount condition and a product tag
___
## Properties
<ParameterTypes parameters={[
@@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
This represents the association between a discount condition and a product type
## Constructors
#### constructor
## constructor
`**new DiscountConditionProductType**()`
This represents the association between a discount condition and a product type
___
## Properties
<ParameterTypes parameters={[
@@ -8,15 +8,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
Provides layer to manipulate discount conditions.
#### Implements
## Implements
## Constructors
#### constructor
## constructor
`**new DiscountConditionService**(«destructured»)`
##### Parameters
### Parameters
<ParameterTypes parameters={[
{
@@ -30,6 +28,8 @@ Provides layer to manipulate discount conditions.
}
]} />
___
## Properties
<ParameterTypes parameters={[
@@ -98,15 +98,35 @@ Provides layer to manipulate discount conditions.
}
]} />
___
## Accessors
#### activeManager\_
### activeManager\_
`Protected` **activeManager\_**: [object Object]
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
#### atomicPhase\_
### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -114,7 +134,7 @@ 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
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -137,7 +157,7 @@ transaction manager is created.
}
]} />
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -169,7 +189,7 @@ transaction manager is created.
}
]} />
##### Returns
#### Returns
Promise&#60;TResult&#62;
@@ -187,11 +207,11 @@ Promise&#60;TResult&#62;
___
#### delete
### delete
`**delete**(discountConditionId): Promise&#60;void \| [DiscountCondition](DiscountCondition.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -205,7 +225,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;void \| [DiscountCondition](DiscountCondition.mdx)&#62;
@@ -223,11 +243,11 @@ Promise&#60;void \| [DiscountCondition](DiscountCondition.mdx)&#62;
___
#### removeResources
### removeResources
`**removeResources**(data): Promise&#60;void&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -241,7 +261,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;void&#62;
@@ -259,11 +279,11 @@ Promise&#60;void&#62;
___
#### retrieve
### retrieve
`**retrieve**(conditionId, config?): Promise&#60;[DiscountCondition](DiscountCondition.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -286,7 +306,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[DiscountCondition](DiscountCondition.mdx)&#62;
@@ -304,11 +324,11 @@ Promise&#60;[DiscountCondition](DiscountCondition.mdx)&#62;
___
#### shouldRetryTransaction\_
### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -322,7 +342,7 @@ ___
}
]} />
##### Returns
#### Returns
`boolean`
@@ -340,11 +360,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={[
{
@@ -367,7 +387,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;([DiscountConditionProduct](DiscountConditionProduct.mdx) \| [DiscountConditionProductType](DiscountConditionProductType.mdx) \| [DiscountConditionProductCollection](DiscountConditionProductCollection.mdx) \| [DiscountConditionProductTag](DiscountConditionProductTag.mdx) \| [DiscountConditionCustomerGroup](DiscountConditionCustomerGroup.mdx))[]&#62;
@@ -385,11 +405,11 @@ Promise&#60;([DiscountConditionProduct](DiscountConditionProduct.mdx) \| [Discou
___
#### withTransaction
### withTransaction
`**withTransaction**(transactionManager?): [DiscountConditionService](DiscountConditionService.mdx)`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -403,7 +423,7 @@ ___
}
]} />
##### Returns
#### Returns
[DiscountConditionService](DiscountConditionService.mdx)
@@ -421,11 +441,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={[
{
@@ -439,7 +459,7 @@ ___
}
]} />
##### Returns
#### Returns
`undefined` \| ``{ resource_ids: (string \| &#123; id: string &#125;)[] ; type: [DiscountConditionType](../enums/DiscountConditionType.mdx) }``
@@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
A discount rule defines how a Discount is calculated when applied to a Cart.
## Constructors
#### constructor
## constructor
`**new DiscountRule**()`
A discount rule defines how a Discount is calculated when applied to a Cart.
___
## Properties
<ParameterTypes parameters={[
@@ -111,13 +111,15 @@ A discount rule defines how a Discount is calculated when applied to a Cart.
}
]} />
___
## Methods
#### beforeInsert
### beforeInsert
`Private **beforeInsert**(): void`
##### Returns
#### Returns
`void`
@@ -8,15 +8,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
Provides layer to manipulate discounts.
#### Implements
## Implements
## Constructors
#### constructor
## constructor
`**new DiscountService**(«destructured»)`
##### Parameters
### Parameters
<ParameterTypes parameters={[
{
@@ -30,6 +28,8 @@ Provides layer to manipulate discounts.
}
]} />
___
## Properties
<ParameterTypes parameters={[
@@ -188,21 +188,41 @@ Provides layer to manipulate discounts.
}
]} />
___
## Accessors
#### activeManager\_
### activeManager\_
`Protected` **activeManager\_**: [object Object]
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
#### addRegion
### addRegion
`**addRegion**(discountId, regionId): Promise&#60;[Discount](Discount.mdx)&#62;`
Adds a region to the discount regions array.
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -225,7 +245,7 @@ Adds a region to the discount regions array.
}
]} />
##### Returns
#### Returns
Promise&#60;[Discount](Discount.mdx)&#62;
@@ -243,7 +263,7 @@ Promise&#60;[Discount](Discount.mdx)&#62;
___
#### atomicPhase\_
### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -251,7 +271,7 @@ 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
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -274,7 +294,7 @@ transaction manager is created.
}
]} />
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -306,7 +326,7 @@ transaction manager is created.
}
]} />
##### Returns
#### Returns
Promise&#60;TResult&#62;
@@ -324,11 +344,11 @@ Promise&#60;TResult&#62;
___
#### calculateDiscountForLineItem
### calculateDiscountForLineItem
`**calculateDiscountForLineItem**(discountId, lineItem, calculationContextData): Promise&#60;number&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -360,7 +380,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;number&#62;
@@ -378,11 +398,11 @@ Promise&#60;number&#62;
___
#### canApplyForCustomer
### canApplyForCustomer
`**canApplyForCustomer**(discountRuleId, customerId): Promise&#60;boolean&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -405,7 +425,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;boolean&#62;
@@ -423,14 +443,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={[
{
@@ -444,7 +464,7 @@ Normalizes discount code to uppercase.
}
]} />
##### Returns
#### Returns
Promise&#60;[Discount](Discount.mdx)&#62;
@@ -462,13 +482,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={[
{
@@ -491,7 +511,7 @@ Creates a dynamic code for a discount id.
}
]} />
##### Returns
#### Returns
Promise&#60;[Discount](Discount.mdx)&#62;
@@ -509,13 +529,13 @@ Promise&#60;[Discount](Discount.mdx)&#62;
___
#### delete
### delete
`**delete**(discountId): Promise&#60;void&#62;`
Deletes a discount idempotently
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -529,7 +549,7 @@ Deletes a discount idempotently
}
]} />
##### Returns
#### Returns
Promise&#60;void&#62;
@@ -547,13 +567,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={[
{
@@ -576,7 +596,7 @@ Deletes a dynamic code for a discount id.
}
]} />
##### Returns
#### Returns
Promise&#60;void&#62;
@@ -594,11 +614,11 @@ Promise&#60;void&#62;
___
#### hasCustomersGroupCondition
### hasCustomersGroupCondition
`**hasCustomersGroupCondition**(discount): boolean`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -612,7 +632,7 @@ ___
}
]} />
##### Returns
#### Returns
`boolean`
@@ -630,11 +650,11 @@ ___
___
#### hasExpired
### hasExpired
`**hasExpired**(discount): boolean`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -648,7 +668,7 @@ ___
}
]} />
##### Returns
#### Returns
`boolean`
@@ -666,11 +686,11 @@ ___
___
#### hasNotStarted
### hasNotStarted
`**hasNotStarted**(discount): boolean`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -684,7 +704,7 @@ ___
}
]} />
##### Returns
#### Returns
`boolean`
@@ -702,11 +722,11 @@ ___
___
#### hasReachedLimit
### hasReachedLimit
`**hasReachedLimit**(discount): boolean`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -720,7 +740,7 @@ ___
}
]} />
##### Returns
#### Returns
`boolean`
@@ -738,11 +758,11 @@ ___
___
#### isDisabled
### isDisabled
`**isDisabled**(discount): boolean`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -756,7 +776,7 @@ ___
}
]} />
##### Returns
#### Returns
`boolean`
@@ -774,11 +794,11 @@ ___
___
#### isValidForRegion
### isValidForRegion
`**isValidForRegion**(discount, region_id): Promise&#60;boolean&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -801,7 +821,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;boolean&#62;
@@ -819,11 +839,11 @@ Promise&#60;boolean&#62;
___
#### list
### list
`**list**(selector?, config?): Promise&#60;[Discount](Discount.mdx)[]&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -846,7 +866,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[Discount](Discount.mdx)[]&#62;
@@ -864,11 +884,11 @@ Promise&#60;[Discount](Discount.mdx)[]&#62;
___
#### listAndCount
### listAndCount
`**listAndCount**(selector?, config?): Promise&#60;[[Discount](Discount.mdx)[], number]&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -891,7 +911,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[[Discount](Discount.mdx)[], number]&#62;
@@ -909,13 +929,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={[
{
@@ -938,7 +958,7 @@ List all the discounts corresponding to the given codes
}
]} />
##### Returns
#### Returns
Promise&#60;[Discount](Discount.mdx)[]&#62;
@@ -956,13 +976,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={[
{
@@ -985,7 +1005,7 @@ Removes a region from the discount regions array.
}
]} />
##### Returns
#### Returns
Promise&#60;[Discount](Discount.mdx)&#62;
@@ -1003,13 +1023,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={[
{
@@ -1032,7 +1052,7 @@ Gets a discount by id.
}
]} />
##### Returns
#### Returns
Promise&#60;[Discount](Discount.mdx)&#62;
@@ -1050,13 +1070,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={[
{
@@ -1079,7 +1099,7 @@ Gets the discount by discount code.
}
]} />
##### Returns
#### Returns
Promise&#60;[Discount](Discount.mdx)&#62;
@@ -1097,11 +1117,11 @@ Promise&#60;[Discount](Discount.mdx)&#62;
___
#### shouldRetryTransaction\_
### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -1115,7 +1135,7 @@ ___
}
]} />
##### Returns
#### Returns
`boolean`
@@ -1133,13 +1153,13 @@ ___
___
#### update
### update
`**update**(discountId, update): Promise&#60;[Discount](Discount.mdx)&#62;`
Updates a discount.
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -1162,7 +1182,7 @@ Updates a discount.
}
]} />
##### Returns
#### Returns
Promise&#60;[Discount](Discount.mdx)&#62;
@@ -1180,11 +1200,11 @@ Promise&#60;[Discount](Discount.mdx)&#62;
___
#### validateDiscountForCartOrThrow
### validateDiscountForCartOrThrow
`**validateDiscountForCartOrThrow**(cart, discount): Promise&#60;void&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -1207,7 +1227,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;void&#62;
@@ -1225,11 +1245,11 @@ Promise&#60;void&#62;
___
#### validateDiscountForProduct
### validateDiscountForProduct
`**validateDiscountForProduct**(discountRuleId, productId?): Promise&#60;boolean&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -1252,7 +1272,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;boolean&#62;
@@ -1270,13 +1290,13 @@ 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
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -1290,7 +1310,7 @@ Creates a discount rule with provided data given that the data is validated.
}
]} />
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -1304,7 +1324,7 @@ Creates a discount rule with provided data given that the data is validated.
}
]} />
##### Returns
#### Returns
`T`
@@ -1322,11 +1342,11 @@ Creates a discount rule with provided data given that the data is validated.
___
#### withTransaction
### withTransaction
`**withTransaction**(transactionManager?): [DiscountService](DiscountService.mdx)`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -1340,7 +1360,7 @@ ___
}
]} />
##### Returns
#### Returns
[DiscountService](DiscountService.mdx)
@@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
A draft order is created by an admin without direct involvement of the customer. Once its payment is marked as captured, it is transformed into an order.
## Constructors
#### constructor
## constructor
`**new DraftOrder**()`
A draft order is created by an admin without direct involvement of the customer. Once its payment is marked as captured, it is transformed into an order.
___
## Properties
<ParameterTypes parameters={[
@@ -147,13 +147,15 @@ 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;
@@ -8,15 +8,13 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
Handles draft orders
#### Implements
## Implements
## Constructors
#### constructor
## constructor
`**new DraftOrderService**(«destructured»)`
##### Parameters
### Parameters
<ParameterTypes parameters={[
{
@@ -30,6 +28,8 @@ Handles draft orders
}
]} />
___
## Properties
<ParameterTypes parameters={[
@@ -188,15 +188,35 @@ Handles draft orders
}
]} />
___
## Accessors
#### activeManager\_
### activeManager\_
`Protected` **activeManager\_**: [object Object]
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
#### atomicPhase\_
### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -204,7 +224,7 @@ 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
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -227,7 +247,7 @@ transaction manager is created.
}
]} />
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -259,7 +279,7 @@ transaction manager is created.
}
]} />
##### Returns
#### Returns
Promise&#60;TResult&#62;
@@ -277,13 +297,13 @@ Promise&#60;TResult&#62;
___
#### create
### create
`**create**(data): Promise&#60;[DraftOrder](DraftOrder.mdx)&#62;`
Creates a draft order.
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -297,7 +317,7 @@ Creates a draft order.
}
]} />
##### Returns
#### Returns
Promise&#60;[DraftOrder](DraftOrder.mdx)&#62;
@@ -315,13 +335,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={[
{
@@ -335,7 +355,7 @@ Deletes draft order idempotently.
}
]} />
##### Returns
#### Returns
Promise&#60;undefined \| [DraftOrder](DraftOrder.mdx)&#62;
@@ -353,13 +373,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={[
{
@@ -382,7 +402,7 @@ Lists draft orders
}
]} />
##### Returns
#### Returns
Promise&#60;[DraftOrder](DraftOrder.mdx)[]&#62;
@@ -400,13 +420,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={[
{
@@ -429,7 +449,7 @@ Lists draft orders alongside the count
}
]} />
##### Returns
#### Returns
Promise&#60;[[DraftOrder](DraftOrder.mdx)[], number]&#62;
@@ -447,13 +467,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={[
{
@@ -476,7 +496,7 @@ Registers a draft order as completed, when an order has been completed.
}
]} />
##### Returns
#### Returns
Promise&#60;UpdateResult&#62;
@@ -494,13 +514,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={[
{
@@ -523,7 +543,7 @@ Retrieves a draft order with the given id.
}
]} />
##### Returns
#### Returns
Promise&#60;[DraftOrder](DraftOrder.mdx)&#62;
@@ -541,13 +561,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={[
{
@@ -570,7 +590,7 @@ Retrieves a draft order based on its associated cart id
}
]} />
##### Returns
#### Returns
Promise&#60;[DraftOrder](DraftOrder.mdx)&#62;
@@ -588,11 +608,11 @@ Promise&#60;[DraftOrder](DraftOrder.mdx)&#62;
___
#### shouldRetryTransaction\_
### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -606,7 +626,7 @@ ___
}
]} />
##### Returns
#### Returns
`boolean`
@@ -624,13 +644,13 @@ ___
___
#### update
### update
`**update**(id, data): Promise&#60;[DraftOrder](DraftOrder.mdx)&#62;`
Updates a draft order with the given data
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -662,7 +682,7 @@ Updates a draft order with the given data
}
]} />
##### Returns
#### Returns
Promise&#60;[DraftOrder](DraftOrder.mdx)&#62;
@@ -680,11 +700,11 @@ Promise&#60;[DraftOrder](DraftOrder.mdx)&#62;
___
#### withTransaction
### withTransaction
`**withTransaction**(transactionManager?): [DraftOrderService](DraftOrderService.mdx)`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -698,7 +718,7 @@ ___
}
]} />
##### Returns
#### Returns
[DraftOrderService](DraftOrderService.mdx)
@@ -13,13 +13,11 @@ subscribers when events happen. Events will run asynchronously.
- [IEventBusService](../interfaces/IEventBusService.mdx)
## Constructors
#### constructor
## constructor
`**new EventBusService**(«destructured», config, isSingleton?)`
##### Parameters
### Parameters
<ParameterTypes parameters={[
{
@@ -51,6 +49,8 @@ subscribers when events happen. Events will run asynchronously.
}
]} />
___
## Properties
<ParameterTypes parameters={[
@@ -146,21 +146,57 @@ subscribers when events happen. Events will run asynchronously.
}
]} />
___
## Accessors
#### activeManager\_
### activeManager\_
`Protected` **activeManager\_**: [object Object]
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
#### eventBusModuleService\_
### eventBusModuleService\_
`Protected` **eventBusModuleService\_**: [object Object]
`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": []
}
]} />
___
## Methods
#### atomicPhase\_
### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -168,7 +204,7 @@ 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
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -191,7 +227,7 @@ transaction manager is created.
}
]} />
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -223,7 +259,7 @@ transaction manager is created.
}
]} />
##### Returns
#### Returns
Promise&#60;TResult&#62;
@@ -241,13 +277,13 @@ 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
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -261,7 +297,7 @@ Calls all subscribers when an event occurs.
}
]} />
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -275,7 +311,7 @@ Calls all subscribers when an event occurs.
}
]} />
##### Returns
#### Returns
Promise&#60;void \| [StagedJob](StagedJob.mdx)[]&#62;
@@ -295,7 +331,7 @@ Promise&#60;void \| [StagedJob](StagedJob.mdx)[]&#62;
Calls all subscribers when an event occurs.
##### Type Parameters
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -309,7 +345,7 @@ Calls all subscribers when an event occurs.
}
]} />
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -341,7 +377,7 @@ Calls all subscribers when an event occurs.
}
]} />
##### Returns
#### Returns
Promise&#60;void \| [StagedJob](StagedJob.mdx)&#62;
@@ -359,11 +395,11 @@ Promise&#60;void \| [StagedJob](StagedJob.mdx)&#62;
___
#### enqueuer\_
### enqueuer\_
`**enqueuer_**(): Promise&#60;void&#62;`
##### Returns
#### Returns
Promise&#60;void&#62;
@@ -381,11 +417,11 @@ Promise&#60;void&#62;
___
#### listJobs
### listJobs
`Protected **listJobs**(listConfig): Promise&#60;never[] \| [StagedJob](StagedJob.mdx)[]&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -399,7 +435,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;never[] \| [StagedJob](StagedJob.mdx)[]&#62;
@@ -417,11 +453,11 @@ Promise&#60;never[] \| [StagedJob](StagedJob.mdx)[]&#62;
___
#### shouldRetryTransaction\_
### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -435,7 +471,7 @@ ___
}
]} />
##### Returns
#### Returns
`boolean`
@@ -453,11 +489,11 @@ ___
___
#### startEnqueuer
### startEnqueuer
`**startEnqueuer**(): void`
##### Returns
#### Returns
`void`
@@ -475,11 +511,11 @@ ___
___
#### stopEnqueuer
### stopEnqueuer
`**stopEnqueuer**(): Promise&#60;void&#62;`
##### Returns
#### Returns
Promise&#60;void&#62;
@@ -497,13 +533,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={[
{
@@ -535,7 +571,7 @@ Adds a function to a list of event subscribers.
}
]} />
##### Returns
#### Returns
[EventBusService](EventBusService.mdx)
@@ -553,13 +589,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={[
{
@@ -591,7 +627,7 @@ Removes function from the list of event subscribers.
}
]} />
##### Returns
#### Returns
[EventBusService](EventBusService.mdx)
@@ -609,11 +645,11 @@ Removes function from the list of event subscribers.
___
#### withTransaction
### withTransaction
`**withTransaction**(transactionManager?): [EventBusService](EventBusService.mdx)`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -627,7 +663,7 @@ ___
}
]} />
##### Returns
#### Returns
[EventBusService](EventBusService.mdx)
@@ -6,12 +6,12 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
# FilterableBatchJobProps
## Constructors
#### constructor
## constructor
`**new FilterableBatchJobProps**()`
___
## Properties
<ParameterTypes parameters={[
@@ -6,12 +6,12 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
# FilterableCartProps
## Constructors
#### constructor
## constructor
`**new FilterableCartProps**()`
___
## Properties
<ParameterTypes parameters={[
@@ -6,12 +6,12 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
# FilterableDiscountProps
## Constructors
#### constructor
## constructor
`**new FilterableDiscountProps**()`
___
## Properties
<ParameterTypes parameters={[
@@ -6,12 +6,12 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
# FilterableLineItemAdjustmentProps
## Constructors
#### constructor
## constructor
`**new FilterableLineItemAdjustmentProps**()`
___
## Properties
<ParameterTypes parameters={[
@@ -8,12 +8,12 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
Filters to apply on the retrieved price lists.
## Constructors
#### constructor
## constructor
`**new FilterablePriceListProps**()`
___
## Properties
<ParameterTypes parameters={[
@@ -8,12 +8,12 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
Filters to apply on retrieved products.
## Constructors
#### constructor
## constructor
`**new FilterableProductProps**()`
___
## Properties
<ParameterTypes parameters={[
@@ -6,12 +6,12 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
# FilterableProductVariantProps
## Constructors
#### constructor
## constructor
`**new FilterableProductVariantProps**()`
___
## Properties
<ParameterTypes parameters={[
@@ -10,13 +10,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
- [IFlagRouter](../interfaces/IFlagRouter.mdx)
## Constructors
#### constructor
## constructor
`**new FlagRouter**(flags)`
##### Parameters
### Parameters
<ParameterTypes parameters={[
{
@@ -30,6 +28,8 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
}
]} />
___
## Properties
<ParameterTypes parameters={[
@@ -44,9 +44,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
}
]} />
___
## Methods
#### isFeatureEnabled
### isFeatureEnabled
`**isFeatureEnabled**(flag): boolean`
@@ -58,7 +60,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 +74,7 @@ An example of a nested flag is workflows. To use it, you would do:
}
]} />
##### Returns
#### Returns
`boolean`
@@ -90,11 +92,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 +114,7 @@ ___
___
#### setFlag
### setFlag
`**setFlag**(key, value): void`
@@ -122,7 +124,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 +147,7 @@ These shapes are used for top-level and nested flags respectively, as explained
}
]} />
##### Returns
#### Returns
`void`
@@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
A Fulfillment is created once an admin can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a fulfillment provider, which typically integrates a third-party shipping service. Fulfillments can be associated with orders, claims, swaps, and returns.
## Constructors
#### constructor
## constructor
`**new Fulfillment**()`
A Fulfillment is created once an admin can prepare the purchased goods. Fulfillments will eventually be shipped and hold information about how to track shipments. Fulfillments are created through a fulfillment provider, which typically integrates a third-party shipping service. Fulfillments can be associated with orders, claims, swaps, and returns.
___
## Properties
<ParameterTypes parameters={[
@@ -210,13 +210,15 @@ A Fulfillment is created once an admin can prepare the purchased goods. Fulfillm
}
]} />
___
## Methods
#### beforeInsert
### beforeInsert
`Private **beforeInsert**(): void`
##### Returns
#### Returns
`void`
@@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
This represents the association between a Line Item and a Fulfillment.
## Constructors
#### constructor
## constructor
`**new FulfillmentItem**()`
This represents the association between a Line Item and a Fulfillment.
___
## Properties
<ParameterTypes parameters={[
@@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
A fulfillment provider represents a fulfillment service installed in the Medusa backend, either through a plugin or backend customizations. It holds the fulfillment service's installation status.
## Constructors
#### constructor
## constructor
`**new FulfillmentProvider**()`
A fulfillment provider represents a fulfillment service installed in the Medusa backend, either through a plugin or backend customizations. It holds the fulfillment service's installation status.
___
## Properties
<ParameterTypes parameters={[
@@ -8,13 +8,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
Helps retrieve fulfillment providers
## Constructors
#### constructor
## constructor
`**new FulfillmentProviderService**(container)`
##### Parameters
### Parameters
<ParameterTypes parameters={[
{
@@ -28,6 +26,8 @@ Helps retrieve fulfillment providers
}
]} />
___
## Properties
<ParameterTypes parameters={[
@@ -96,15 +96,35 @@ Helps retrieve fulfillment providers
}
]} />
___
## Accessors
#### activeManager\_
### activeManager\_
`Protected` **activeManager\_**: [object Object]
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
#### atomicPhase\_
### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -112,7 +132,7 @@ 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
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -135,7 +155,7 @@ transaction manager is created.
}
]} />
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -167,7 +187,7 @@ transaction manager is created.
}
]} />
##### Returns
#### Returns
Promise&#60;TResult&#62;
@@ -185,11 +205,11 @@ Promise&#60;TResult&#62;
___
#### calculatePrice
### calculatePrice
`**calculatePrice**(option, data, cart?): Promise&#60;number&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -221,7 +241,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;number&#62;
@@ -239,11 +259,11 @@ Promise&#60;number&#62;
___
#### canCalculate
### canCalculate
`**canCalculate**(option): Promise&#60;boolean&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -257,7 +277,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;boolean&#62;
@@ -275,11 +295,11 @@ Promise&#60;boolean&#62;
___
#### cancelFulfillment
### cancelFulfillment
`**cancelFulfillment**(fulfillment): Promise&#60;[Fulfillment](Fulfillment.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -293,7 +313,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[Fulfillment](Fulfillment.mdx)&#62;
@@ -311,11 +331,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={[
{
@@ -356,7 +376,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;Record&#60;string, unknown&#62;&#62;
@@ -374,11 +394,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={[
{
@@ -392,7 +412,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;Record&#60;string, unknown&#62;&#62;
@@ -410,11 +430,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;
@@ -432,11 +452,11 @@ Promise&#60;[FulfillmentProvider](FulfillmentProvider.mdx)[]&#62;
___
#### listFulfillmentOptions
### listFulfillmentOptions
`**listFulfillmentOptions**(providerIds): Promise&#60;[FulfillmentOptions](../types/FulfillmentOptions.mdx)[]&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -450,7 +470,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[FulfillmentOptions](../types/FulfillmentOptions.mdx)[]&#62;
@@ -468,11 +488,11 @@ Promise&#60;[FulfillmentOptions](../types/FulfillmentOptions.mdx)[]&#62;
___
#### registerInstalledProviders
### registerInstalledProviders
`**registerInstalledProviders**(providers): Promise&#60;void&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -486,7 +506,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;void&#62;
@@ -504,13 +524,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={[
{
@@ -542,7 +562,7 @@ Fetches documents from the fulfillment provider
}
]} />
##### Returns
#### Returns
Promise&#60;any&#62;
@@ -560,11 +580,11 @@ Promise&#60;any&#62;
___
#### retrieveProvider
### retrieveProvider
`**retrieveProvider**(providerId): any`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -578,7 +598,7 @@ ___
}
]} />
##### Returns
#### Returns
`any`
@@ -596,11 +616,11 @@ ___
___
#### shouldRetryTransaction\_
### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -614,7 +634,7 @@ ___
}
]} />
##### Returns
#### Returns
`boolean`
@@ -632,11 +652,11 @@ ___
___
#### validateFulfillmentData
### validateFulfillmentData
`**validateFulfillmentData**(option, data, cart): Promise&#60;Record&#60;string, unknown&#62;&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -668,7 +688,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;Record&#60;string, unknown&#62;&#62;
@@ -686,11 +706,11 @@ Promise&#60;Record&#60;string, unknown&#62;&#62;
___
#### validateOption
### validateOption
`**validateOption**(option): Promise&#60;boolean&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -704,7 +724,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;boolean&#62;
@@ -722,11 +742,11 @@ Promise&#60;boolean&#62;
___
#### withTransaction
### withTransaction
`**withTransaction**(transactionManager?): [FulfillmentProviderService](FulfillmentProviderService.mdx)`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -740,7 +760,7 @@ ___
}
]} />
##### Returns
#### Returns
[FulfillmentProviderService](FulfillmentProviderService.mdx)
@@ -8,13 +8,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
Handles Fulfillments
## Constructors
#### constructor
## constructor
`**new FulfillmentService**(«destructured»)`
##### Parameters
### Parameters
<ParameterTypes parameters={[
{
@@ -28,6 +26,8 @@ Handles Fulfillments
}
]} />
___
## Properties
<ParameterTypes parameters={[
@@ -150,15 +150,35 @@ Handles Fulfillments
}
]} />
___
## Accessors
#### activeManager\_
### activeManager\_
`Protected` **activeManager\_**: [object Object]
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
#### atomicPhase\_
### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -166,7 +186,7 @@ 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
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -189,7 +209,7 @@ transaction manager is created.
}
]} />
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -221,7 +241,7 @@ transaction manager is created.
}
]} />
##### Returns
#### Returns
Promise&#60;TResult&#62;
@@ -239,7 +259,7 @@ Promise&#60;TResult&#62;
___
#### cancelFulfillment
### cancelFulfillment
`**cancelFulfillment**(fulfillmentOrId): Promise&#60;[Fulfillment](Fulfillment.mdx)&#62;`
@@ -247,7 +267,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={[
{
@@ -261,7 +281,7 @@ Throws if the fulfillment has already been shipped.
}
]} />
##### Returns
#### Returns
Promise&#60;[Fulfillment](Fulfillment.mdx)&#62;
@@ -279,7 +299,7 @@ Promise&#60;[Fulfillment](Fulfillment.mdx)&#62;
___
#### createFulfillment
### createFulfillment
`**createFulfillment**(order, itemsToFulfill, custom?): Promise&#60;[Fulfillment](Fulfillment.mdx)[]&#62;`
@@ -288,7 +308,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={[
{
@@ -320,7 +340,7 @@ those partitions.
}
]} />
##### Returns
#### Returns
Promise&#60;[Fulfillment](Fulfillment.mdx)[]&#62;
@@ -338,14 +358,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={[
{
@@ -377,7 +397,7 @@ tracking links and potentially more metadata.
}
]} />
##### Returns
#### Returns
Promise&#60;[Fulfillment](Fulfillment.mdx)&#62;
@@ -395,13 +415,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={[
{
@@ -424,7 +444,7 @@ Retrieves the order line items, given an array of items.
}
]} />
##### Returns
#### Returns
Promise&#60;(null \| [LineItem](LineItem.mdx))[]&#62;
@@ -442,11 +462,11 @@ Promise&#60;(null \| [LineItem](LineItem.mdx))[]&#62;
___
#### partitionItems\_
### partitionItems\_
`**partitionItems_**(shippingMethods, items): [FulfillmentItemPartition](../types/FulfillmentItemPartition.mdx)[]`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -469,7 +489,7 @@ ___
}
]} />
##### Returns
#### Returns
[FulfillmentItemPartition](../types/FulfillmentItemPartition.mdx)[]
@@ -487,13 +507,13 @@ ___
___
#### retrieve
### retrieve
`**retrieve**(fulfillmentId, config?): Promise&#60;[Fulfillment](Fulfillment.mdx)&#62;`
Retrieves a fulfillment by its id.
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -516,7 +536,7 @@ Retrieves a fulfillment by its id.
}
]} />
##### Returns
#### Returns
Promise&#60;[Fulfillment](Fulfillment.mdx)&#62;
@@ -534,11 +554,11 @@ Promise&#60;[Fulfillment](Fulfillment.mdx)&#62;
___
#### shouldRetryTransaction\_
### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -552,7 +572,7 @@ ___
}
]} />
##### Returns
#### Returns
`boolean`
@@ -570,7 +590,7 @@ ___
___
#### validateFulfillmentLineItem\_
### validateFulfillmentLineItem\_
`**validateFulfillmentLineItem_**(item, quantity): null \| [LineItem](LineItem.mdx)`
@@ -579,7 +599,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={[
{
@@ -602,7 +622,7 @@ quantity from the quantity that was originally purchased.
}
]} />
##### Returns
#### Returns
`null` \| [LineItem](LineItem.mdx)
@@ -620,11 +640,11 @@ quantity from the quantity that was originally purchased.
___
#### withTransaction
### withTransaction
`**withTransaction**(transactionManager?): [FulfillmentService](FulfillmentService.mdx)`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -638,7 +658,7 @@ ___
}
]} />
##### Returns
#### Returns
[FulfillmentService](FulfillmentService.mdx)
@@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.
## Constructors
#### constructor
## constructor
`**new GiftCard**()`
Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.
___
## Properties
<ParameterTypes parameters={[
@@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.
## Constructors
#### constructor
## constructor
`**new GiftCard**()`
Gift Cards are redeemable and represent a value that can be used towards the payment of an Order.
___
## Properties
<ParameterTypes parameters={[
@@ -156,13 +156,15 @@ Gift Cards are redeemable and represent a value that can be used towards the pay
}
]} />
___
## Methods
#### beforeInsert
### beforeInsert
`Private **beforeInsert**(): void`
##### Returns
#### Returns
`void`
@@ -8,13 +8,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
Provides layer to manipulate gift cards.
## Constructors
#### constructor
## constructor
`**new GiftCardService**(«destructured»)`
##### Parameters
### Parameters
<ParameterTypes parameters={[
{
@@ -28,6 +26,8 @@ Provides layer to manipulate gift cards.
}
]} />
___
## Properties
<ParameterTypes parameters={[
@@ -132,15 +132,35 @@ Provides layer to manipulate gift cards.
}
]} />
___
## Accessors
#### activeManager\_
### activeManager\_
`Protected` **activeManager\_**: [object Object]
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
#### atomicPhase\_
### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -148,7 +168,7 @@ 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
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -171,7 +191,7 @@ transaction manager is created.
}
]} />
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -203,7 +223,7 @@ transaction manager is created.
}
]} />
##### Returns
#### Returns
Promise&#60;TResult&#62;
@@ -221,13 +241,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={[
{
@@ -241,7 +261,7 @@ Creates a gift card with provided data given that the data is validated.
}
]} />
##### Returns
#### Returns
Promise&#60;[GiftCard](GiftCard.mdx)&#62;
@@ -259,11 +279,11 @@ Promise&#60;[GiftCard](GiftCard.mdx)&#62;
___
#### createTransaction
### createTransaction
`**createTransaction**(data): Promise&#60;string&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -277,7 +297,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;string&#62;
@@ -295,13 +315,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={[
{
@@ -315,7 +335,7 @@ Deletes a gift card idempotently
}
]} />
##### Returns
#### Returns
Promise&#60;void \| [GiftCard](GiftCard.mdx)&#62;
@@ -333,11 +353,11 @@ Promise&#60;void \| [GiftCard](GiftCard.mdx)&#62;
___
#### list
### list
`**list**(selector?, config?): Promise&#60;[GiftCard](GiftCard.mdx)[]&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -360,7 +380,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[GiftCard](GiftCard.mdx)[]&#62;
@@ -378,11 +398,11 @@ Promise&#60;[GiftCard](GiftCard.mdx)[]&#62;
___
#### listAndCount
### listAndCount
`**listAndCount**(selector?, config?): Promise&#60;[[GiftCard](GiftCard.mdx)[], number]&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -405,7 +425,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[[GiftCard](GiftCard.mdx)[], number]&#62;
@@ -423,13 +443,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={[
{
@@ -452,7 +472,7 @@ Gets a gift card by id.
}
]} />
##### Returns
#### Returns
Promise&#60;[GiftCard](GiftCard.mdx)&#62;
@@ -470,11 +490,11 @@ Promise&#60;[GiftCard](GiftCard.mdx)&#62;
___
#### retrieveByCode
### retrieveByCode
`**retrieveByCode**(code, config?): Promise&#60;[GiftCard](GiftCard.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -497,7 +517,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[GiftCard](GiftCard.mdx)&#62;
@@ -515,11 +535,11 @@ Promise&#60;[GiftCard](GiftCard.mdx)&#62;
___
#### retrieve\_
### retrieve\_
`Protected **retrieve_**(selector, config?): Promise&#60;[GiftCard](GiftCard.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -542,7 +562,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[GiftCard](GiftCard.mdx)&#62;
@@ -560,11 +580,11 @@ Promise&#60;[GiftCard](GiftCard.mdx)&#62;
___
#### shouldRetryTransaction\_
### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -578,7 +598,7 @@ ___
}
]} />
##### Returns
#### Returns
`boolean`
@@ -596,13 +616,13 @@ ___
___
#### update
### update
`**update**(giftCardId, update): Promise&#60;[GiftCard](GiftCard.mdx)&#62;`
Updates a giftCard.
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -625,7 +645,7 @@ Updates a giftCard.
}
]} />
##### Returns
#### Returns
Promise&#60;[GiftCard](GiftCard.mdx)&#62;
@@ -643,11 +663,11 @@ Promise&#60;[GiftCard](GiftCard.mdx)&#62;
___
#### withTransaction
### withTransaction
`**withTransaction**(transactionManager?): [GiftCardService](GiftCardService.mdx)`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -661,7 +681,7 @@ ___
}
]} />
##### Returns
#### Returns
[GiftCardService](GiftCardService.mdx)
@@ -679,13 +699,13 @@ ___
___
#### generateCode
### generateCode
`Static **generateCode**(): string`
Generates a 16 character gift card code
##### Returns
#### Returns
`string`
@@ -703,14 +723,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={[
{
@@ -733,7 +753,7 @@ provided by the user or the tax rate. Based on these conditions, tax\_rate chang
}
]} />
##### Returns
#### Returns
`null` \| `number`
@@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
Gift Card Transactions are created once a Customer uses a Gift Card to pay for their Order.
## Constructors
#### constructor
## constructor
`**new GiftCardTransaction**()`
Gift Card Transactions are created once a Customer uses a Gift Card to pay for their Order.
___
## Properties
<ParameterTypes parameters={[
@@ -102,13 +102,15 @@ 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`
@@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
Idempotency Key is used to continue a process in case of any failure that might occur.
## Constructors
#### constructor
## constructor
`**new IdempotencyKey**()`
Idempotency Key is used to continue a process in case of any failure that might occur.
___
## Properties
<ParameterTypes parameters={[
@@ -111,13 +111,15 @@ Idempotency Key is used to continue a process in case of any failure that might
}
]} />
___
## Methods
#### beforeInsert
### beforeInsert
`Private **beforeInsert**(): void`
##### Returns
#### Returns
`void`
@@ -6,13 +6,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
# IdempotencyKeyService
## Constructors
#### constructor
## constructor
`**new IdempotencyKeyService**(«destructured»)`
##### Parameters
### Parameters
<ParameterTypes parameters={[
{
@@ -26,6 +24,8 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
}
]} />
___
## Properties
<ParameterTypes parameters={[
@@ -85,15 +85,35 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
}
]} />
___
## Accessors
#### activeManager\_
### activeManager\_
`Protected` **activeManager\_**: [object Object]
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
#### atomicPhase\_
### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -101,7 +121,7 @@ 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
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -124,7 +144,7 @@ transaction manager is created.
}
]} />
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -156,7 +176,7 @@ transaction manager is created.
}
]} />
##### Returns
#### Returns
Promise&#60;TResult&#62;
@@ -174,7 +194,7 @@ Promise&#60;TResult&#62;
___
#### create
### create
`**create**(payload): Promise&#60;[IdempotencyKey](IdempotencyKey.mdx)&#62;`
@@ -182,7 +202,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={[
{
@@ -196,7 +216,7 @@ identifier.
}
]} />
##### Returns
#### Returns
Promise&#60;[IdempotencyKey](IdempotencyKey.mdx)&#62;
@@ -214,13 +234,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={[
{
@@ -261,7 +281,7 @@ Execute the initial steps in a idempotent request.
}
]} />
##### Returns
#### Returns
Promise&#60;[IdempotencyKey](IdempotencyKey.mdx)&#62;
@@ -279,13 +299,13 @@ Promise&#60;[IdempotencyKey](IdempotencyKey.mdx)&#62;
___
#### lock
### lock
`**lock**(idempotencyKey): Promise&#60;[IdempotencyKey](IdempotencyKey.mdx)&#62;`
Locks an idempotency.
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -299,7 +319,7 @@ Locks an idempotency.
}
]} />
##### Returns
#### Returns
Promise&#60;[IdempotencyKey](IdempotencyKey.mdx)&#62;
@@ -317,13 +337,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={[
{
@@ -337,7 +357,7 @@ Retrieves an idempotency key
}
]} />
##### Returns
#### Returns
Promise&#60;[IdempotencyKey](IdempotencyKey.mdx)&#62;
@@ -355,11 +375,11 @@ Promise&#60;[IdempotencyKey](IdempotencyKey.mdx)&#62;
___
#### shouldRetryTransaction\_
### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -373,7 +393,7 @@ ___
}
]} />
##### Returns
#### Returns
`boolean`
@@ -391,13 +411,13 @@ ___
___
#### update
### update
`**update**(idempotencyKey, update): Promise&#60;[IdempotencyKey](IdempotencyKey.mdx)&#62;`
Locks an idempotency.
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -420,7 +440,7 @@ Locks an idempotency.
}
]} />
##### Returns
#### Returns
Promise&#60;[IdempotencyKey](IdempotencyKey.mdx)&#62;
@@ -438,11 +458,11 @@ Promise&#60;[IdempotencyKey](IdempotencyKey.mdx)&#62;
___
#### withTransaction
### withTransaction
`**withTransaction**(transactionManager?): [IdempotencyKeyService](IdempotencyKeyService.mdx)`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -456,7 +476,7 @@ ___
}
]} />
##### Returns
#### Returns
[IdempotencyKeyService](IdempotencyKeyService.mdx)
@@ -474,7 +494,7 @@ ___
___
#### workStage
### workStage
`**workStage**(idempotencyKey, callback): Promise&#60;[IdempotencyKey](IdempotencyKey.mdx)&#62;`
@@ -484,7 +504,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={[
{
@@ -507,7 +527,7 @@ always consist of 2 or more of these phases. The required phases are
}
]} />
##### Returns
#### Returns
Promise&#60;[IdempotencyKey](IdempotencyKey.mdx)&#62;
@@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
An Image is used to store details about uploaded images. Images are uploaded by the File Service, and the URL is provided by the File Service.
## Constructors
#### constructor
## constructor
`**new Image**()`
An Image is used to store details about uploaded images. Images are uploaded by the File Service, and the URL is provided by the File Service.
___
## Properties
<ParameterTypes parameters={[
@@ -75,13 +75,15 @@ An Image is used to store details about uploaded images. Images are uploaded by
}
]} />
___
## Methods
#### beforeInsert
### beforeInsert
`Private **beforeInsert**(): void`
##### Returns
#### Returns
`void`
@@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
Line Items are created when a product is added to a Cart. When Line Items are purchased they will get copied to the resulting order, swap, or claim, and can eventually be referenced in Fulfillments and Returns. Line items may also be used for order edits.
## Constructors
#### constructor
## constructor
`**new LineItem**()`
Line Items are created when a product is added to a Cart. When Line Items are purchased they will get copied to the resulting order, swap, or claim, and can eventually be referenced in Fulfillments and Returns. Line items may also be used for order edits.
___
## Properties
<ParameterTypes parameters={[
@@ -409,13 +409,15 @@ 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 +435,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 +457,11 @@ ___
___
#### beforeUpdate
### beforeUpdate
`**beforeUpdate**(): void`
##### Returns
#### Returns
`void`
@@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
A Line Item Adjustment includes details on discounts applied on a line item.
## Constructors
#### constructor
## constructor
`**new LineItemAdjustment**()`
A Line Item Adjustment includes details on discounts applied on a line item.
___
## Properties
<ParameterTypes parameters={[
@@ -93,13 +93,15 @@ A Line Item Adjustment includes details on discounts applied on a line item.
}
]} />
___
## Methods
#### beforeInsert
### beforeInsert
`Private **beforeInsert**(): void`
##### Returns
#### Returns
`void`
@@ -8,13 +8,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
Provides layer to manipulate line item adjustments.
## Constructors
#### constructor
## constructor
`**new LineItemAdjustmentService**(«destructured»)`
##### Parameters
### Parameters
<ParameterTypes parameters={[
{
@@ -28,6 +26,8 @@ Provides layer to manipulate line item adjustments.
}
]} />
___
## Properties
<ParameterTypes parameters={[
@@ -96,15 +96,35 @@ Provides layer to manipulate line item adjustments.
}
]} />
___
## Accessors
#### activeManager\_
### activeManager\_
`Protected` **activeManager\_**: [object Object]
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
#### atomicPhase\_
### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -112,7 +132,7 @@ 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
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -135,7 +155,7 @@ transaction manager is created.
}
]} />
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -167,7 +187,7 @@ transaction manager is created.
}
]} />
##### Returns
#### Returns
Promise&#60;TResult&#62;
@@ -185,13 +205,13 @@ Promise&#60;TResult&#62;
___
#### create
### create
`**create**(data): Promise&#60;[LineItemAdjustment](LineItemAdjustment.mdx)&#62;`
Creates a line item adjustment
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -205,7 +225,7 @@ Creates a line item adjustment
}
]} />
##### Returns
#### Returns
Promise&#60;[LineItemAdjustment](LineItemAdjustment.mdx)&#62;
@@ -223,13 +243,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={[
{
@@ -252,7 +272,7 @@ Creates adjustment for a line item
}
]} />
##### Returns
#### Returns
Promise&#60;[LineItemAdjustment](LineItemAdjustment.mdx)[]&#62;
@@ -270,13 +290,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={[
{
@@ -299,7 +319,7 @@ Creates adjustment for a line item
}
]} />
##### Returns
#### Returns
Promise&#60;[LineItemAdjustment](LineItemAdjustment.mdx)[] \| [LineItemAdjustment](LineItemAdjustment.mdx)[][]&#62;
@@ -317,13 +337,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={[
{
@@ -337,7 +357,7 @@ Deletes line item adjustments matching a selector
}
]} />
##### Returns
#### Returns
Promise&#60;void&#62;
@@ -355,13 +375,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={[
{
@@ -393,7 +413,7 @@ Creates adjustment for a line item
}
]} />
##### Returns
#### Returns
Promise&#60;[GeneratedAdjustment](../types/GeneratedAdjustment.mdx)[]&#62;
@@ -411,13 +431,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={[
{
@@ -440,7 +460,7 @@ Lists line item adjustments
}
]} />
##### Returns
#### Returns
Promise&#60;[LineItemAdjustment](LineItemAdjustment.mdx)[]&#62;
@@ -458,13 +478,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={[
{
@@ -487,7 +507,7 @@ Retrieves a line item adjustment by id.
}
]} />
##### Returns
#### Returns
Promise&#60;[LineItemAdjustment](LineItemAdjustment.mdx)&#62;
@@ -505,11 +525,11 @@ Promise&#60;[LineItemAdjustment](LineItemAdjustment.mdx)&#62;
___
#### shouldRetryTransaction\_
### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -523,7 +543,7 @@ ___
}
]} />
##### Returns
#### Returns
`boolean`
@@ -541,13 +561,13 @@ ___
___
#### update
### update
`**update**(id, data): Promise&#60;[LineItemAdjustment](LineItemAdjustment.mdx)&#62;`
Creates a line item adjustment
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -570,7 +590,7 @@ Creates a line item adjustment
}
]} />
##### Returns
#### Returns
Promise&#60;[LineItemAdjustment](LineItemAdjustment.mdx)&#62;
@@ -588,11 +608,11 @@ Promise&#60;[LineItemAdjustment](LineItemAdjustment.mdx)&#62;
___
#### withTransaction
### withTransaction
`**withTransaction**(transactionManager?): [LineItemAdjustmentService](LineItemAdjustmentService.mdx)`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -606,7 +626,7 @@ ___
}
]} />
##### Returns
#### Returns
[LineItemAdjustmentService](LineItemAdjustmentService.mdx)
@@ -6,13 +6,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
# LineItemService
## Constructors
#### constructor
## constructor
`**new LineItemService**(«destructured»)`
##### Parameters
### Parameters
<ParameterTypes parameters={[
{
@@ -26,6 +24,8 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
}
]} />
___
## Properties
<ParameterTypes parameters={[
@@ -166,15 +166,35 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
}
]} />
___
## Accessors
#### activeManager\_
### activeManager\_
`Protected` **activeManager\_**: [object Object]
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
#### atomicPhase\_
### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -182,7 +202,7 @@ 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
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -205,7 +225,7 @@ transaction manager is created.
}
]} />
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -237,7 +257,7 @@ transaction manager is created.
}
]} />
##### Returns
#### Returns
Promise&#60;TResult&#62;
@@ -255,11 +275,11 @@ Promise&#60;TResult&#62;
___
#### cloneTo
### cloneTo
`**cloneTo**(ids, data?, options?): Promise&#60;[LineItem](LineItem.mdx)[]&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -300,7 +320,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[LineItem](LineItem.mdx)[]&#62;
@@ -318,13 +338,13 @@ Promise&#60;[LineItem](LineItem.mdx)[]&#62;
___
#### create
### create
`**create**<TypeParameter T, TypeParameter TResult>(data): Promise&#60;TResult&#62;`
Create a line item
##### Type Parameters
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -347,7 +367,7 @@ Create a line item
}
]} />
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -361,7 +381,7 @@ Create a line item
}
]} />
##### Returns
#### Returns
Promise&#60;TResult&#62;
@@ -379,14 +399,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={[
{
@@ -409,7 +429,7 @@ return.
}
]} />
##### Returns
#### Returns
Promise&#60;[LineItem](LineItem.mdx)[]&#62;
@@ -427,13 +447,13 @@ Promise&#60;[LineItem](LineItem.mdx)[]&#62;
___
#### createTaxLine
### createTaxLine
`**createTaxLine**(args): [LineItemTaxLine](LineItemTaxLine.mdx)`
Create a line item tax line.
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -447,7 +467,7 @@ Create a line item tax line.
}
]} />
##### Returns
#### Returns
[LineItemTaxLine](LineItemTaxLine.mdx)
@@ -465,13 +485,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={[
{
@@ -485,7 +505,7 @@ Deletes a line item.
}
]} />
##### Returns
#### Returns
Promise&#60;undefined \| null \| [LineItem](LineItem.mdx)&#62;
@@ -503,11 +523,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={[
{
@@ -521,7 +541,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;undefined \| null \| [LineItem](LineItem.mdx)&#62;
@@ -544,13 +564,13 @@ 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
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -573,7 +593,7 @@ Generate a single or multiple line item without persisting the data into the db
}
]} />
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -614,7 +634,7 @@ Generate a single or multiple line item without persisting the data into the db
}
]} />
##### Returns
#### Returns
Promise&#60;TResult&#62;
@@ -632,11 +652,11 @@ Promise&#60;TResult&#62;
___
#### generateLineItem
### generateLineItem
`Protected **generateLineItem**(variant, quantity, context): Promise&#60;[LineItem](LineItem.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -740,7 +760,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[LineItem](LineItem.mdx)&#62;
@@ -758,11 +778,11 @@ Promise&#60;[LineItem](LineItem.mdx)&#62;
___
#### list
### list
`**list**(selector, config?): Promise&#60;[LineItem](LineItem.mdx)[]&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -785,7 +805,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[LineItem](LineItem.mdx)[]&#62;
@@ -803,13 +823,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={[
{
@@ -832,7 +852,7 @@ Retrieves a line item by its id.
}
]} />
##### Returns
#### Returns
Promise&#60;[LineItem](LineItem.mdx)&#62;
@@ -850,11 +870,11 @@ Promise&#60;[LineItem](LineItem.mdx)&#62;
___
#### shouldRetryTransaction\_
### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -868,7 +888,7 @@ ___
}
]} />
##### Returns
#### Returns
`boolean`
@@ -886,13 +906,13 @@ ___
___
#### update
### update
`**update**(idOrSelector, data): Promise&#60;[LineItem](LineItem.mdx)[]&#62;`
Updates a line item
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -915,7 +935,7 @@ Updates a line item
}
]} />
##### Returns
#### Returns
Promise&#60;[LineItem](LineItem.mdx)[]&#62;
@@ -933,11 +953,11 @@ Promise&#60;[LineItem](LineItem.mdx)[]&#62;
___
#### validateGenerateArguments
### validateGenerateArguments
`Protected **validateGenerateArguments**<TypeParameter T, TypeParameter TResult>(variantIdOrData, regionIdOrContext, quantity?): void`
##### Type Parameters
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -960,7 +980,7 @@ ___
}
]} />
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -992,7 +1012,7 @@ ___
}
]} />
##### Returns
#### Returns
`void`
@@ -1010,11 +1030,11 @@ ___
___
#### withTransaction
### withTransaction
`**withTransaction**(transactionManager?): [LineItemService](LineItemService.mdx)`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -1028,7 +1048,7 @@ ___
}
]} />
##### Returns
#### Returns
[LineItemService](LineItemService.mdx)
@@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
A Line Item Tax Line represents the taxes applied on a line item.
## Constructors
#### constructor
## constructor
`**new LineItemTaxLine**()`
A Line Item Tax Line represents the taxes applied on a line item.
___
## Properties
<ParameterTypes parameters={[
@@ -102,13 +102,15 @@ A Line Item Tax Line represents the taxes applied on a line item.
}
]} />
___
## Methods
#### beforeInsert
### beforeInsert
`Private **beforeInsert**(): void`
##### Returns
#### Returns
`void`
@@ -8,12 +8,12 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
Orchestrates dynamic middleware registered through the Medusa Middleware API
## Constructors
#### constructor
## constructor
`**new MiddlewareService**()`
___
## Properties
<ParameterTypes parameters={[
@@ -55,15 +55,17 @@ 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 +88,7 @@ Adds a middleware function to be called after authentication is completed.
}
]} />
##### Returns
#### Returns
`void`
@@ -104,13 +106,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 +135,7 @@ Adds a middleware function to be called before authentication is completed.
}
]} />
##### Returns
#### Returns
`void`
@@ -151,13 +153,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 +173,7 @@ Adds a middleware function to be called before cart creation
}
]} />
##### Returns
#### Returns
`void`
@@ -189,11 +191,11 @@ Adds a middleware function to be called before cart creation
___
#### addRouter
### addRouter
`**addRouter**(path, router): void`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -216,7 +218,7 @@ ___
}
]} />
##### Returns
#### Returns
`void`
@@ -234,11 +236,11 @@ ___
___
#### getRouters
### getRouters
`**getRouters**(path): Router[]`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -252,7 +254,7 @@ ___
}
]} />
##### Returns
#### Returns
Router[]
@@ -270,13 +272,13 @@ Router[]
___
#### usePostAuthentication
### usePostAuthentication
`**usePostAuthentication**(app): void`
Adds post authentication middleware to an express app.
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -290,7 +292,7 @@ Adds post authentication middleware to an express app.
}
]} />
##### Returns
#### Returns
`void`
@@ -308,13 +310,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 +330,7 @@ Adds pre authentication middleware to an express app.
}
]} />
##### Returns
#### Returns
`void`
@@ -346,11 +348,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 +370,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 +390,7 @@ Validates a middleware function, throws if fn is not of type function.
}
]} />
##### Returns
#### Returns
`void`
@@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
A Money Amount represent a price amount, for example, a product variant's price or a price in a price list. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based pricing, the given price in a specific Region. If region-based pricing is used, the amount will be in the currency defined for the Region.
## Constructors
#### constructor
## constructor
`**new MoneyAmount**()`
A Money Amount represent a price amount, for example, a product variant's price or a price in a price list. Each Money Amount either has a Currency or Region associated with it to indicate the pricing in a given Currency or, for fully region-based pricing, the given price in a specific Region. If region-based pricing is used, the amount will be in the currency defined for the Region.
___
## Properties
<ParameterTypes parameters={[
@@ -165,13 +165,15 @@ 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 +191,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 +213,11 @@ ___
___
#### beforeUpdate
### beforeUpdate
`Private **beforeUpdate**(): void`
##### Returns
#### Returns
`void`
@@ -6,13 +6,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
# NewTotalsService
## Constructors
#### constructor
## constructor
`**new NewTotalsService**(«destructured»)`
##### Parameters
### Parameters
<ParameterTypes parameters={[
{
@@ -26,6 +24,8 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
}
]} />
___
## Properties
<ParameterTypes parameters={[
@@ -103,15 +103,35 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
}
]} />
___
## Accessors
#### activeManager\_
### activeManager\_
`Protected` **activeManager\_**: [object Object]
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
#### atomicPhase\_
### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -119,7 +139,7 @@ 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
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -142,7 +162,7 @@ transaction manager is created.
}
]} />
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -174,7 +194,7 @@ transaction manager is created.
}
]} />
##### Returns
#### Returns
Promise&#60;TResult&#62;
@@ -192,13 +212,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={[
{
@@ -248,7 +268,7 @@ Calculate and return the gift cards totals
}
]} />
##### Returns
#### Returns
Promise&#60;&#123; tax_total: number ; total: number &#125;&#62;
@@ -266,13 +286,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={[
{
@@ -322,7 +342,7 @@ Calculate and return the gift cards totals based on their transactions
}
]} />
##### Returns
#### Returns
`object`
@@ -361,11 +381,11 @@ Calculate and return the gift cards totals based on their transactions
___
#### getGiftCardableAmount
### getGiftCardableAmount
`**getGiftCardableAmount**(«destructured»): number`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -424,7 +444,7 @@ ___
}
]} />
##### Returns
#### Returns
`number`
@@ -442,13 +462,13 @@ ___
___
#### getLineItemRefund
### getLineItemRefund
`**getLineItemRefund**(lineItem, «destructured»): number`
Return the amount that can be refund on a line item
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -534,7 +554,7 @@ Return the amount that can be refund on a line item
}
]} />
##### Returns
#### Returns
`number`
@@ -552,11 +572,11 @@ Return the amount that can be refund on a line item
___
#### getLineItemRefundLegacy
### getLineItemRefundLegacy
`Protected **getLineItemRefundLegacy**(lineItem, «destructured»): number`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -633,7 +653,7 @@ ___
}
]} />
##### Returns
#### Returns
`number`
@@ -651,13 +671,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={[
{
@@ -707,7 +727,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;
@@ -725,13 +745,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={[
{
@@ -799,7 +819,7 @@ Calculate and return the legacy calculated totals using the tax rate
}
]} />
##### Returns
#### Returns
Promise&#60;[LineItemTotals](../types/LineItemTotals.mdx)&#62;
@@ -817,13 +837,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={[
{
@@ -900,7 +920,7 @@ Calculate and return the totals for an item
}
]} />
##### Returns
#### Returns
Promise&#60;[LineItemTotals](../types/LineItemTotals.mdx)&#62;
@@ -918,13 +938,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={[
{
@@ -983,7 +1003,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;
@@ -1001,13 +1021,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={[
{
@@ -1057,7 +1077,7 @@ Calculate and return the shipping method totals legacy using the tax rate
}
]} />
##### Returns
#### Returns
Promise&#60;[ShippingMethodTotals](../types/ShippingMethodTotals.mdx)&#62;
@@ -1075,13 +1095,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={[
{
@@ -1140,7 +1160,7 @@ Calculate and return the shipping method totals
}
]} />
##### Returns
#### Returns
Promise&#60;[ShippingMethodTotals](../types/ShippingMethodTotals.mdx)&#62;
@@ -1158,11 +1178,11 @@ Promise&#60;[ShippingMethodTotals](../types/ShippingMethodTotals.mdx)&#62;
___
#### shouldRetryTransaction\_
### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -1176,7 +1196,7 @@ ___
}
]} />
##### Returns
#### Returns
`boolean`
@@ -1194,11 +1214,11 @@ ___
___
#### withTransaction
### withTransaction
`**withTransaction**(transactionManager?): [NewTotalsService](NewTotalsService.mdx)`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -1212,7 +1232,7 @@ ___
}
]} />
##### Returns
#### Returns
[NewTotalsService](NewTotalsService.mdx)
@@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
A Note is an element that can be used in association with different resources to allow admin users to describe additional information. For example, they can be used to add additional information about orders.
## Constructors
#### constructor
## constructor
`**new Note**()`
A Note is an element that can be used in association with different resources to allow admin users to describe additional information. For example, they can be used to add additional information about orders.
___
## Properties
<ParameterTypes parameters={[
@@ -111,13 +111,15 @@ A Note is an element that can be used in association with different resources to
}
]} />
___
## Methods
#### beforeInsert
### beforeInsert
`Private **beforeInsert**(): void`
##### Returns
#### Returns
`void`
@@ -6,13 +6,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
# NoteService
## Constructors
#### constructor
## constructor
`**new NoteService**(«destructured»)`
##### Parameters
### Parameters
<ParameterTypes parameters={[
{
@@ -26,6 +24,8 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
}
]} />
___
## Properties
<ParameterTypes parameters={[
@@ -130,15 +130,35 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
}
]} />
___
## Accessors
#### activeManager\_
### activeManager\_
`Protected` **activeManager\_**: [object Object]
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
#### atomicPhase\_
### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -146,7 +166,7 @@ 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
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -169,7 +189,7 @@ transaction manager is created.
}
]} />
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -201,7 +221,7 @@ transaction manager is created.
}
]} />
##### Returns
#### Returns
Promise&#60;TResult&#62;
@@ -219,13 +239,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={[
{
@@ -257,7 +277,7 @@ Creates a note associated with a given author
}
]} />
##### Returns
#### Returns
Promise&#60;[Note](Note.mdx)&#62;
@@ -275,13 +295,13 @@ Promise&#60;[Note](Note.mdx)&#62;
___
#### delete
### delete
`**delete**(noteId): Promise&#60;void&#62;`
Deletes a given note
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -295,7 +315,7 @@ Deletes a given note
}
]} />
##### Returns
#### Returns
Promise&#60;void&#62;
@@ -313,13 +333,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={[
{
@@ -342,7 +362,7 @@ Fetches all notes related to the given selector
}
]} />
##### Returns
#### Returns
Promise&#60;[Note](Note.mdx)[]&#62;
@@ -360,13 +380,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={[
{
@@ -389,7 +409,7 @@ Fetches all notes related to the given selector
}
]} />
##### Returns
#### Returns
Promise&#60;[[Note](Note.mdx)[], number]&#62;
@@ -407,13 +427,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={[
{
@@ -436,7 +456,7 @@ Retrieves a specific note.
}
]} />
##### Returns
#### Returns
Promise&#60;[Note](Note.mdx)&#62;
@@ -454,11 +474,11 @@ Promise&#60;[Note](Note.mdx)&#62;
___
#### shouldRetryTransaction\_
### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -472,7 +492,7 @@ ___
}
]} />
##### Returns
#### Returns
`boolean`
@@ -490,13 +510,13 @@ ___
___
#### update
### update
`**update**(noteId, value): Promise&#60;[Note](Note.mdx)&#62;`
Updates a given note with a new value
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -519,7 +539,7 @@ Updates a given note with a new value
}
]} />
##### Returns
#### Returns
Promise&#60;[Note](Note.mdx)&#62;
@@ -537,11 +557,11 @@ Promise&#60;[Note](Note.mdx)&#62;
___
#### withTransaction
### withTransaction
`**withTransaction**(transactionManager?): [NoteService](NoteService.mdx)`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -555,7 +575,7 @@ ___
}
]} />
##### Returns
#### Returns
[NoteService](NoteService.mdx)
@@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
A notification is an alert sent, typically to customers, using the installed Notification Provider as a reaction to internal events such as `order.placed`. Notifications can be resent.
## Constructors
#### constructor
## constructor
`**new Notification**()`
A notification is an alert sent, typically to customers, using the installed Notification Provider as a reaction to internal events such as `order.placed`. Notifications can be resent.
___
## Properties
<ParameterTypes parameters={[
@@ -156,13 +156,15 @@ A notification is an alert sent, typically to customers, using the installed Not
}
]} />
___
## Methods
#### beforeInsert
### beforeInsert
`Private **beforeInsert**(): void`
##### Returns
#### Returns
`void`
@@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
A notification provider represents a notification service installed in the Medusa backend, either through a plugin or backend customizations. It holds the notification service's installation status.
## Constructors
#### constructor
## constructor
`**new NotificationProvider**()`
A notification provider represents a notification service installed in the Medusa backend, either through a plugin or backend customizations. It holds the notification service's installation status.
___
## Properties
<ParameterTypes parameters={[
@@ -6,13 +6,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
# NotificationService
## Constructors
#### constructor
## constructor
`**new NotificationService**(container)`
##### Parameters
### Parameters
<ParameterTypes parameters={[
{
@@ -26,6 +24,8 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
}
]} />
___
## Properties
<ParameterTypes parameters={[
@@ -130,15 +130,35 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
}
]} />
___
## Accessors
#### activeManager\_
### activeManager\_
`Protected` **activeManager\_**: [object Object]
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
#### atomicPhase\_
### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -146,7 +166,7 @@ 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
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -169,7 +189,7 @@ transaction manager is created.
}
]} />
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -201,7 +221,7 @@ transaction manager is created.
}
]} />
##### Returns
#### Returns
Promise&#60;TResult&#62;
@@ -219,7 +239,7 @@ Promise&#60;TResult&#62;
___
#### handleEvent
### handleEvent
`**handleEvent**(eventName, data): Promise&#60;undefined \| void \| [Notification](Notification.mdx)[]&#62;`
@@ -227,7 +247,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={[
{
@@ -250,7 +270,7 @@ order to allow for resends. Will log any errors that are encountered.
}
]} />
##### Returns
#### Returns
Promise&#60;undefined \| void \| [Notification](Notification.mdx)[]&#62;
@@ -268,13 +288,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={[
{
@@ -297,7 +317,7 @@ Retrieves a list of notifications.
}
]} />
##### Returns
#### Returns
Promise&#60;[Notification](Notification.mdx)[]&#62;
@@ -315,13 +335,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={[
{
@@ -344,7 +364,7 @@ Retrieves a list of notifications and total count.
}
]} />
##### Returns
#### Returns
Promise&#60;[[Notification](Notification.mdx)[], number]&#62;
@@ -362,14 +382,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={[
{
@@ -383,7 +403,7 @@ used to generate on demand invoices or other documents.
}
]} />
##### Returns
#### Returns
`void`
@@ -401,13 +421,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={[
{
@@ -421,7 +441,7 @@ Takes a list of notification provider ids and persists them in the database.
}
]} />
##### Returns
#### Returns
Promise&#60;void&#62;
@@ -439,14 +459,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={[
{
@@ -469,7 +489,7 @@ underlying provider's resendNotification method.
}
]} />
##### Returns
#### Returns
Promise&#60;[Notification](Notification.mdx)&#62;
@@ -487,13 +507,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={[
{
@@ -516,7 +536,7 @@ Retrieves a notification with a given id
}
]} />
##### Returns
#### Returns
Promise&#60;[Notification](Notification.mdx)&#62;
@@ -534,14 +554,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={[
{
@@ -555,7 +575,7 @@ resolution fails.
}
]} />
##### Returns
#### Returns
[AbstractNotificationService](AbstractNotificationService.mdx)
@@ -573,14 +593,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={[
{
@@ -612,7 +632,7 @@ method. Persists the Notification in the database.
}
]} />
##### Returns
#### Returns
Promise&#60;undefined \| [Notification](Notification.mdx)&#62;
@@ -630,11 +650,11 @@ Promise&#60;undefined \| [Notification](Notification.mdx)&#62;
___
#### shouldRetryTransaction\_
### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -648,7 +668,7 @@ ___
}
]} />
##### Returns
#### Returns
`boolean`
@@ -666,13 +686,13 @@ ___
___
#### subscribe
### subscribe
`**subscribe**(eventName, providerId): void`
Subscribes a given provider to an event.
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -695,7 +715,7 @@ Subscribes a given provider to an event.
}
]} />
##### Returns
#### Returns
`void`
@@ -713,11 +733,11 @@ Subscribes a given provider to an event.
___
#### withTransaction
### withTransaction
`**withTransaction**(transactionManager?): [NotificationService](NotificationService.mdx)`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -731,7 +751,7 @@ ___
}
]} />
##### Returns
#### Returns
[NotificationService](NotificationService.mdx)
@@ -8,12 +8,12 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
Fields used to apply flexible filters on numbers.
## Constructors
#### constructor
## constructor
`**new NumericalComparisonOperator**()`
___
## Properties
<ParameterTypes parameters={[
@@ -6,12 +6,12 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
# Oauth
## Constructors
#### constructor
## constructor
`**new Oauth**()`
___
## Properties
<ParameterTypes parameters={[
@@ -71,13 +71,15 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
}
]} />
___
## Methods
#### beforeInsert
### beforeInsert
`Private **beforeInsert**(): void`
##### Returns
#### Returns
`void`
@@ -6,13 +6,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
# OauthService
## Constructors
#### constructor
## constructor
`**new OauthService**(cradle)`
##### Parameters
### Parameters
<ParameterTypes parameters={[
{
@@ -26,6 +24,8 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
}
]} />
___
## Properties
<ParameterTypes parameters={[
@@ -130,15 +130,35 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
}
]} />
___
## Accessors
#### activeManager\_
### activeManager\_
`Protected` **activeManager\_**: [object Object]
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
#### atomicPhase\_
### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -146,7 +166,7 @@ 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
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -169,7 +189,7 @@ transaction manager is created.
}
]} />
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -201,7 +221,7 @@ transaction manager is created.
}
]} />
##### Returns
#### Returns
Promise&#60;TResult&#62;
@@ -219,11 +239,11 @@ Promise&#60;TResult&#62;
___
#### create
### create
`**create**(data): Promise&#60;[Oauth](Oauth.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -237,7 +257,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[Oauth](Oauth.mdx)&#62;
@@ -255,11 +275,11 @@ Promise&#60;[Oauth](Oauth.mdx)&#62;
___
#### generateToken
### generateToken
`**generateToken**(appName, code, state): Promise&#60;[Oauth](Oauth.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -291,7 +311,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[Oauth](Oauth.mdx)&#62;
@@ -309,11 +329,11 @@ Promise&#60;[Oauth](Oauth.mdx)&#62;
___
#### list
### list
`**list**(selector): Promise&#60;[Oauth](Oauth.mdx)[]&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -327,7 +347,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[Oauth](Oauth.mdx)[]&#62;
@@ -345,11 +365,11 @@ Promise&#60;[Oauth](Oauth.mdx)[]&#62;
___
#### refreshToken
### refreshToken
`**refreshToken**(appName): Promise&#60;[Oauth](Oauth.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -363,7 +383,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[Oauth](Oauth.mdx)&#62;
@@ -381,11 +401,11 @@ Promise&#60;[Oauth](Oauth.mdx)&#62;
___
#### registerOauthApp
### registerOauthApp
`**registerOauthApp**(appDetails): Promise&#60;[Oauth](Oauth.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -399,7 +419,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[Oauth](Oauth.mdx)&#62;
@@ -417,11 +437,11 @@ Promise&#60;[Oauth](Oauth.mdx)&#62;
___
#### retrieve
### retrieve
`**retrieve**(oauthId): Promise&#60;[Oauth](Oauth.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -435,7 +455,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[Oauth](Oauth.mdx)&#62;
@@ -453,11 +473,11 @@ Promise&#60;[Oauth](Oauth.mdx)&#62;
___
#### retrieveByName
### retrieveByName
`**retrieveByName**(appName): Promise&#60;[Oauth](Oauth.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -471,7 +491,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[Oauth](Oauth.mdx)&#62;
@@ -489,11 +509,11 @@ Promise&#60;[Oauth](Oauth.mdx)&#62;
___
#### shouldRetryTransaction\_
### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -507,7 +527,7 @@ ___
}
]} />
##### Returns
#### Returns
`boolean`
@@ -525,11 +545,11 @@ ___
___
#### update
### update
`**update**(id, update): Promise&#60;[Oauth](Oauth.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -552,7 +572,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[Oauth](Oauth.mdx)&#62;
@@ -570,11 +590,11 @@ Promise&#60;[Oauth](Oauth.mdx)&#62;
___
#### withTransaction
### withTransaction
`**withTransaction**(transactionManager?): [OauthService](OauthService.mdx)`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -588,7 +608,7 @@ ___
}
]} />
##### Returns
#### Returns
[OauthService](OauthService.mdx)
@@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
An order is a purchase made by a customer. It holds details about payment and fulfillment of the order. An order may also be created from a draft order, which is created by an admin user.
## Constructors
#### constructor
## constructor
`**new Order**()`
An order is a purchase made by a customer. It holds details about payment and fulfillment of the order. An order may also be created from a draft order, which is created by an admin user.
___
## Properties
<ParameterTypes parameters={[
@@ -534,13 +534,15 @@ 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;
@@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
Order edit allows modifying items in an order, such as adding, updating, or deleting items from the original order. Once the order edit is confirmed, the changes are reflected on the original order.
## Constructors
#### constructor
## constructor
`**new OrderEdit**()`
Order edit allows modifying items in an order, such as adding, updating, or deleting items from the original order. Once the order edit is confirmed, the changes are reflected on the original order.
___
## Properties
<ParameterTypes parameters={[
@@ -282,13 +282,15 @@ 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 +308,11 @@ Order edit allows modifying items in an order, such as adding, updating, or dele
___
#### loadStatus
### loadStatus
`**loadStatus**(): void`
##### Returns
#### Returns
`void`
@@ -6,13 +6,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
# OrderEditItemChangeService
## Constructors
#### constructor
## constructor
`**new OrderEditItemChangeService**(«destructured»)`
##### Parameters
### Parameters
<ParameterTypes parameters={[
{
@@ -26,6 +24,8 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
}
]} />
___
## Properties
<ParameterTypes parameters={[
@@ -139,15 +139,35 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
}
]} />
___
## Accessors
#### activeManager\_
### activeManager\_
`Protected` **activeManager\_**: [object Object]
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
#### atomicPhase\_
### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -155,7 +175,7 @@ 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
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -178,7 +198,7 @@ transaction manager is created.
}
]} />
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -210,7 +230,7 @@ transaction manager is created.
}
]} />
##### Returns
#### Returns
Promise&#60;TResult&#62;
@@ -228,11 +248,11 @@ Promise&#60;TResult&#62;
___
#### create
### create
`**create**(data): Promise&#60;[OrderItemChange](OrderItemChange.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -246,7 +266,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[OrderItemChange](OrderItemChange.mdx)&#62;
@@ -264,11 +284,11 @@ Promise&#60;[OrderItemChange](OrderItemChange.mdx)&#62;
___
#### delete
### delete
`**delete**(itemChangeIds): Promise&#60;void&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -282,7 +302,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;void&#62;
@@ -300,11 +320,11 @@ Promise&#60;void&#62;
___
#### list
### list
`**list**(selector, config?): Promise&#60;[OrderItemChange](OrderItemChange.mdx)[]&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -327,7 +347,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[OrderItemChange](OrderItemChange.mdx)[]&#62;
@@ -345,11 +365,11 @@ Promise&#60;[OrderItemChange](OrderItemChange.mdx)[]&#62;
___
#### retrieve
### retrieve
`**retrieve**(id, config?): Promise&#60;[OrderItemChange](OrderItemChange.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -372,7 +392,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[OrderItemChange](OrderItemChange.mdx)&#62;
@@ -390,11 +410,11 @@ Promise&#60;[OrderItemChange](OrderItemChange.mdx)&#62;
___
#### shouldRetryTransaction\_
### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -408,7 +428,7 @@ ___
}
]} />
##### Returns
#### Returns
`boolean`
@@ -426,11 +446,11 @@ ___
___
#### withTransaction
### withTransaction
`**withTransaction**(transactionManager?): [OrderEditItemChangeService](OrderEditItemChangeService.mdx)`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -444,7 +464,7 @@ ___
}
]} />
##### Returns
#### Returns
[OrderEditItemChangeService](OrderEditItemChangeService.mdx)
@@ -6,13 +6,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
# OrderEditService
## Constructors
#### constructor
## constructor
`**new OrderEditService**(«destructured»)`
##### Parameters
### Parameters
<ParameterTypes parameters={[
{
@@ -26,6 +24,8 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
}
]} />
___
## Properties
<ParameterTypes parameters={[
@@ -220,25 +220,61 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
}
]} />
___
## Accessors
#### activeManager\_
### activeManager\_
`Protected` **activeManager\_**: [object Object]
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
#### inventoryService\_
### inventoryService\_
`Protected` **inventoryService\_**: [object Object]
`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": []
}
]} />
___
## Methods
#### addLineItem
### addLineItem
`**addLineItem**(orderEditId, data): Promise&#60;void&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -261,7 +297,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;void&#62;
@@ -279,7 +315,7 @@ Promise&#60;void&#62;
___
#### atomicPhase\_
### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -287,7 +323,7 @@ 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
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -310,7 +346,7 @@ transaction manager is created.
}
]} />
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -342,7 +378,7 @@ transaction manager is created.
}
]} />
##### Returns
#### Returns
Promise&#60;TResult&#62;
@@ -360,11 +396,11 @@ Promise&#60;TResult&#62;
___
#### cancel
### cancel
`**cancel**(orderEditId, context?): Promise&#60;[OrderEdit](OrderEdit.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -396,7 +432,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[OrderEdit](OrderEdit.mdx)&#62;
@@ -414,11 +450,11 @@ Promise&#60;[OrderEdit](OrderEdit.mdx)&#62;
___
#### confirm
### confirm
`**confirm**(orderEditId, context?): Promise&#60;[OrderEdit](OrderEdit.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -450,7 +486,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[OrderEdit](OrderEdit.mdx)&#62;
@@ -468,11 +504,11 @@ Promise&#60;[OrderEdit](OrderEdit.mdx)&#62;
___
#### create
### create
`**create**(data, context): Promise&#60;[OrderEdit](OrderEdit.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -504,7 +540,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[OrderEdit](OrderEdit.mdx)&#62;
@@ -522,11 +558,11 @@ Promise&#60;[OrderEdit](OrderEdit.mdx)&#62;
___
#### decline
### decline
`**decline**(orderEditId, context): Promise&#60;[OrderEdit](OrderEdit.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -567,7 +603,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[OrderEdit](OrderEdit.mdx)&#62;
@@ -585,11 +621,11 @@ Promise&#60;[OrderEdit](OrderEdit.mdx)&#62;
___
#### decorateTotals
### decorateTotals
`**decorateTotals**(orderEdit): Promise&#60;[OrderEdit](OrderEdit.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -603,7 +639,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[OrderEdit](OrderEdit.mdx)&#62;
@@ -621,11 +657,11 @@ Promise&#60;[OrderEdit](OrderEdit.mdx)&#62;
___
#### delete
### delete
`**delete**(id): Promise&#60;void&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -639,7 +675,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;void&#62;
@@ -657,11 +693,11 @@ Promise&#60;void&#62;
___
#### deleteClonedItems
### deleteClonedItems
`Protected **deleteClonedItems**(orderEditId): Promise&#60;void&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -675,7 +711,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;void&#62;
@@ -693,11 +729,11 @@ Promise&#60;void&#62;
___
#### deleteItemChange
### deleteItemChange
`**deleteItemChange**(orderEditId, itemChangeId): Promise&#60;void&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -720,7 +756,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;void&#62;
@@ -738,11 +774,11 @@ Promise&#60;void&#62;
___
#### list
### list
`**list**(selector, config?): Promise&#60;[OrderEdit](OrderEdit.mdx)[]&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -765,7 +801,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[OrderEdit](OrderEdit.mdx)[]&#62;
@@ -783,11 +819,11 @@ Promise&#60;[OrderEdit](OrderEdit.mdx)[]&#62;
___
#### listAndCount
### listAndCount
`**listAndCount**(selector, config?): Promise&#60;[[OrderEdit](OrderEdit.mdx)[], number]&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -810,7 +846,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[[OrderEdit](OrderEdit.mdx)[], number]&#62;
@@ -828,11 +864,11 @@ Promise&#60;[[OrderEdit](OrderEdit.mdx)[], number]&#62;
___
#### refreshAdjustments
### refreshAdjustments
`**refreshAdjustments**(orderEditId, config?): Promise&#60;void&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -864,7 +900,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;void&#62;
@@ -882,11 +918,11 @@ Promise&#60;void&#62;
___
#### removeLineItem
### removeLineItem
`**removeLineItem**(orderEditId, lineItemId): Promise&#60;void&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -909,7 +945,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;void&#62;
@@ -927,11 +963,11 @@ Promise&#60;void&#62;
___
#### requestConfirmation
### requestConfirmation
`**requestConfirmation**(orderEditId, context?): Promise&#60;[OrderEdit](OrderEdit.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -963,7 +999,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[OrderEdit](OrderEdit.mdx)&#62;
@@ -981,11 +1017,11 @@ Promise&#60;[OrderEdit](OrderEdit.mdx)&#62;
___
#### retrieve
### retrieve
`**retrieve**(orderEditId, config?): Promise&#60;[OrderEdit](OrderEdit.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -1008,7 +1044,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[OrderEdit](OrderEdit.mdx)&#62;
@@ -1026,11 +1062,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={[
{
@@ -1053,7 +1089,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;undefined \| null \| [OrderEdit](OrderEdit.mdx)&#62;
@@ -1071,11 +1107,11 @@ Promise&#60;undefined \| null \| [OrderEdit](OrderEdit.mdx)&#62;
___
#### shouldRetryTransaction\_
### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -1089,7 +1125,7 @@ ___
}
]} />
##### Returns
#### Returns
`boolean`
@@ -1107,11 +1143,11 @@ ___
___
#### update
### update
`**update**(orderEditId, data): Promise&#60;[OrderEdit](OrderEdit.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -1134,7 +1170,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[OrderEdit](OrderEdit.mdx)&#62;
@@ -1152,7 +1188,7 @@ Promise&#60;[OrderEdit](OrderEdit.mdx)&#62;
___
#### updateLineItem
### updateLineItem
`**updateLineItem**(orderEditId, itemId, data): Promise&#60;void&#62;`
@@ -1160,7 +1196,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={[
{
@@ -1201,7 +1237,7 @@ Create or update order edit item change line item and apply the quantity
}
]} />
##### Returns
#### Returns
Promise&#60;void&#62;
@@ -1219,11 +1255,11 @@ Promise&#60;void&#62;
___
#### withTransaction
### withTransaction
`**withTransaction**(transactionManager?): [OrderEditService](OrderEditService.mdx)`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -1237,7 +1273,7 @@ ___
}
]} />
##### Returns
#### Returns
[OrderEditService](OrderEditService.mdx)
@@ -1255,11 +1291,11 @@ ___
___
#### isOrderEditActive
### isOrderEditActive
`Static Private **isOrderEditActive**(orderEdit): boolean`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -1273,7 +1309,7 @@ ___
}
]} />
##### Returns
#### Returns
`boolean`
@@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
An order item change is a change made within an order edit to an order's items. These changes are not reflected on the original order until the order edit is confirmed.
## Constructors
#### constructor
## constructor
`**new OrderItemChange**()`
An order item change is a change made within an order edit to an order's items. These changes are not reflected on the original order until the order edit is confirmed.
___
## Properties
<ParameterTypes parameters={[
@@ -120,13 +120,15 @@ 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`
@@ -6,13 +6,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
# OrderService
## Constructors
#### constructor
## constructor
`**new OrderService**(«destructured»)`
##### Parameters
### Parameters
<ParameterTypes parameters={[
{
@@ -26,6 +24,8 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
}
]} />
___
## Properties
<ParameterTypes parameters={[
@@ -418,19 +418,39 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
}
]} />
___
## Accessors
#### activeManager\_
### activeManager\_
`Protected` **activeManager\_**: [object Object]
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
#### addShippingMethod
### addShippingMethod
`**addShippingMethod**(orderId, optionId, data?, config?): Promise&#60;[Order](Order.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -471,7 +491,7 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
}
]} />
##### Returns
#### Returns
Promise&#60;[Order](Order.mdx)&#62;
@@ -489,14 +509,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={[
{
@@ -510,7 +530,7 @@ and payment has been captured.
}
]} />
##### Returns
#### Returns
Promise&#60;[Order](Order.mdx)&#62;
@@ -528,7 +548,7 @@ Promise&#60;[Order](Order.mdx)&#62;
___
#### atomicPhase\_
### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -536,7 +556,7 @@ 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
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -559,7 +579,7 @@ transaction manager is created.
}
]} />
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -591,7 +611,7 @@ transaction manager is created.
}
]} />
##### Returns
#### Returns
Promise&#60;TResult&#62;
@@ -609,7 +629,7 @@ Promise&#60;TResult&#62;
___
#### cancel
### cancel
`**cancel**(orderId): Promise&#60;[Order](Order.mdx)&#62;`
@@ -617,7 +637,7 @@ Cancels an order.
Throws if fulfillment process has been initiated.
Throws if payment process has been initiated.
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -631,7 +651,7 @@ Throws if payment process has been initiated.
}
]} />
##### Returns
#### Returns
Promise&#60;[Order](Order.mdx)&#62;
@@ -649,13 +669,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={[
{
@@ -669,7 +689,7 @@ Cancels a fulfillment (if related to an order)
}
]} />
##### Returns
#### Returns
Promise&#60;[Order](Order.mdx)&#62;
@@ -687,13 +707,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={[
{
@@ -707,7 +727,7 @@ Captures payment for an order.
}
]} />
##### Returns
#### Returns
Promise&#60;[Order](Order.mdx)&#62;
@@ -725,11 +745,11 @@ Promise&#60;[Order](Order.mdx)&#62;
___
#### completeOrder
### completeOrder
`**completeOrder**(orderId): Promise&#60;[Order](Order.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -743,7 +763,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[Order](Order.mdx)&#62;
@@ -761,13 +781,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={[
{
@@ -781,7 +801,7 @@ Creates an order from a cart
}
]} />
##### Returns
#### Returns
Promise&#60;[Order](Order.mdx)&#62;
@@ -799,7 +819,7 @@ Promise&#60;[Order](Order.mdx)&#62;
___
#### createFulfillment
### createFulfillment
`**createFulfillment**(orderId, itemsToFulfill, config?): Promise&#60;[Order](Order.mdx)&#62;`
@@ -808,7 +828,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={[
{
@@ -867,7 +887,7 @@ to their respective fulfillment provider.
}
]} />
##### Returns
#### Returns
Promise&#60;[Order](Order.mdx)&#62;
@@ -885,11 +905,11 @@ Promise&#60;[Order](Order.mdx)&#62;
___
#### createGiftCardsFromLineItem\_
### createGiftCardsFromLineItem\_
`Protected **createGiftCardsFromLineItem_**(order, lineItem, manager): Promise&#60;[GiftCard](GiftCard.mdx)&#62;[]`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -921,7 +941,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[GiftCard](GiftCard.mdx)&#62;[]
@@ -939,13 +959,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={[
{
@@ -1004,7 +1024,7 @@ Refunds a given amount back to the customer.
}
]} />
##### Returns
#### Returns
Promise&#60;[Order](Order.mdx)&#62;
@@ -1022,7 +1042,7 @@ Promise&#60;[Order](Order.mdx)&#62;
___
#### createShipment
### createShipment
`**createShipment**(orderId, fulfillmentId, trackingLinks?, config?): Promise&#60;[Order](Order.mdx)&#62;`
@@ -1030,7 +1050,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={[
{
@@ -1089,7 +1109,7 @@ have been created in regards to the shipment.
}
]} />
##### Returns
#### Returns
Promise&#60;[Order](Order.mdx)&#62;
@@ -1107,13 +1127,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={[
{
@@ -1136,7 +1156,7 @@ Calculate and attach the different total fields on the object
}
]} />
##### Returns
#### Returns
Promise&#60;[Order](Order.mdx)&#62;
@@ -1156,7 +1176,7 @@ Promise&#60;[Order](Order.mdx)&#62;
Calculate and attach the different total fields on the object
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -1179,7 +1199,7 @@ Calculate and attach the different total fields on the object
}
]} />
##### Returns
#### Returns
Promise&#60;[Order](Order.mdx)&#62;
@@ -1197,11 +1217,11 @@ Promise&#60;[Order](Order.mdx)&#62;
___
#### decorateTotalsLegacy
### decorateTotalsLegacy
`Protected **decorateTotalsLegacy**(order, totalsFields?): Promise&#60;[Order](Order.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -1224,7 +1244,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[Order](Order.mdx)&#62;
@@ -1242,13 +1262,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={[
{
@@ -1280,7 +1300,7 @@ Retrieves the order line items, given an array of items.
}
]} />
##### Returns
#### Returns
Promise&#60;[LineItem](LineItem.mdx)[]&#62;
@@ -1298,11 +1318,11 @@ Promise&#60;[LineItem](LineItem.mdx)[]&#62;
___
#### getTotalsRelations
### getTotalsRelations
`Private **getTotalsRelations**(config): string[]`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -1316,7 +1336,7 @@ ___
}
]} />
##### Returns
#### Returns
`string`[]
@@ -1334,11 +1354,11 @@ ___
___
#### list
### list
`**list**(selector, config?): Promise&#60;[Order](Order.mdx)[]&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -1361,7 +1381,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[Order](Order.mdx)[]&#62;
@@ -1379,11 +1399,11 @@ Promise&#60;[Order](Order.mdx)[]&#62;
___
#### listAndCount
### listAndCount
`**listAndCount**(selector, config?): Promise&#60;[[Order](Order.mdx)[], number]&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -1406,7 +1426,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[[Order](Order.mdx)[], number]&#62;
@@ -1424,7 +1444,7 @@ Promise&#60;[[Order](Order.mdx)[], number]&#62;
___
#### registerReturnReceived
### registerReturnReceived
`**registerReturnReceived**(orderId, receivedReturn, customRefundAmount?): Promise&#60;[Order](Order.mdx)&#62;`
@@ -1436,7 +1456,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={[
{
@@ -1468,7 +1488,7 @@ mismatches.
}
]} />
##### Returns
#### Returns
Promise&#60;[Order](Order.mdx)&#62;
@@ -1486,13 +1506,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={[
{
@@ -1515,7 +1535,7 @@ Gets an order by id.
}
]} />
##### Returns
#### Returns
Promise&#60;[Order](Order.mdx)&#62;
@@ -1533,13 +1553,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={[
{
@@ -1562,7 +1582,7 @@ Gets an order by cart id.
}
]} />
##### Returns
#### Returns
Promise&#60;[Order](Order.mdx)&#62;
@@ -1580,11 +1600,11 @@ Promise&#60;[Order](Order.mdx)&#62;
___
#### retrieveByCartIdWithTotals
### retrieveByCartIdWithTotals
`**retrieveByCartIdWithTotals**(cartId, options?): Promise&#60;[Order](Order.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -1607,7 +1627,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[Order](Order.mdx)&#62;
@@ -1625,13 +1645,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={[
{
@@ -1654,7 +1674,7 @@ Gets an order by id.
}
]} />
##### Returns
#### Returns
Promise&#60;[Order](Order.mdx)&#62;
@@ -1672,11 +1692,11 @@ Promise&#60;[Order](Order.mdx)&#62;
___
#### retrieveLegacy
### retrieveLegacy
`Protected **retrieveLegacy**(orderIdOrSelector, config?): Promise&#60;[Order](Order.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -1699,7 +1719,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[Order](Order.mdx)&#62;
@@ -1717,11 +1737,11 @@ Promise&#60;[Order](Order.mdx)&#62;
___
#### retrieveWithTotals
### retrieveWithTotals
`**retrieveWithTotals**(orderId, options?, context?): Promise&#60;[Order](Order.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -1753,7 +1773,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[Order](Order.mdx)&#62;
@@ -1771,11 +1791,11 @@ Promise&#60;[Order](Order.mdx)&#62;
___
#### shouldRetryTransaction\_
### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -1789,7 +1809,7 @@ ___
}
]} />
##### Returns
#### Returns
`boolean`
@@ -1807,11 +1827,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={[
{
@@ -1825,7 +1845,7 @@ ___
}
]} />
##### Returns
#### Returns
`object`
@@ -1873,7 +1893,7 @@ ___
___
#### update
### update
`**update**(orderId, update): Promise&#60;[Order](Order.mdx)&#62;`
@@ -1881,7 +1901,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={[
{
@@ -1904,7 +1924,7 @@ will throw errors if metadata updates are attempted.
}
]} />
##### Returns
#### Returns
Promise&#60;[Order](Order.mdx)&#62;
@@ -1922,13 +1942,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={[
{
@@ -1951,7 +1971,7 @@ Updates the order's billing address.
}
]} />
##### Returns
#### Returns
Promise&#60;void&#62;
@@ -1969,13 +1989,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={[
{
@@ -1998,7 +2018,7 @@ Updates the order's shipping address.
}
]} />
##### Returns
#### Returns
Promise&#60;void&#62;
@@ -2016,7 +2036,7 @@ Promise&#60;void&#62;
___
#### validateFulfillmentLineItem
### validateFulfillmentLineItem
`Protected **validateFulfillmentLineItem**(item, quantity): null \| [LineItem](LineItem.mdx)`
@@ -2025,7 +2045,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={[
{
@@ -2048,7 +2068,7 @@ quantity from the quantity that was originally purchased.
}
]} />
##### Returns
#### Returns
`null` \| [LineItem](LineItem.mdx)
@@ -2066,11 +2086,11 @@ quantity from the quantity that was originally purchased.
___
#### withTransaction
### withTransaction
`**withTransaction**(transactionManager?): [OrderService](OrderService.mdx)`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -2084,7 +2104,7 @@ ___
}
]} />
##### Returns
#### Returns
[OrderService](OrderService.mdx)
@@ -6,12 +6,12 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
# OrdersReturnItem
## Constructors
#### constructor
## constructor
`**new OrdersReturnItem**()`
___
## Properties
<ParameterTypes parameters={[
@@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
A payment is originally created from a payment session. Once a payment session is authorized, the payment is created to represent the authorized amount with a given payment method. Payments can be captured, canceled or refunded. Payments can be made towards orders, swaps, order edits, or other resources.
## Constructors
#### constructor
## constructor
`**new Payment**()`
A payment is originally created from a payment session. Once a payment session is authorized, the payment is created to represent the authorized amount with a given payment method. Payments can be captured, canceled or refunded. Payments can be made towards orders, swaps, order edits, or other resources.
___
## Properties
<ParameterTypes parameters={[
@@ -192,13 +192,15 @@ A payment is originally created from a payment session. Once a payment session i
}
]} />
___
## Methods
#### beforeInsert
### beforeInsert
`Private **beforeInsert**(): void`
##### Returns
#### Returns
`void`
@@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
A payment collection allows grouping and managing a list of payments at one. This can be helpful when making additional payment for order edits or integrating installment payments.
## Constructors
#### constructor
## constructor
`**new PaymentCollection**()`
A payment collection allows grouping and managing a list of payments at one. This can be helpful when making additional payment for order edits or integrating installment payments.
___
## Properties
<ParameterTypes parameters={[
@@ -174,13 +174,15 @@ A payment collection allows grouping and managing a list of payments at one. Thi
}
]} />
___
## Methods
#### beforeInsert
### beforeInsert
`Private **beforeInsert**(): void`
##### Returns
#### Returns
`void`
@@ -6,13 +6,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
# PaymentCollectionService
## Constructors
#### constructor
## constructor
`**new PaymentCollectionService**(«destructured»)`
##### Parameters
### Parameters
<ParameterTypes parameters={[
{
@@ -26,6 +24,8 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
}
]} />
___
## Properties
<ParameterTypes parameters={[
@@ -157,15 +157,35 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
}
]} />
___
## Accessors
#### activeManager\_
### activeManager\_
`Protected` **activeManager\_**: [object Object]
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
#### atomicPhase\_
### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -173,7 +193,7 @@ 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
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -196,7 +216,7 @@ transaction manager is created.
}
]} />
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -228,7 +248,7 @@ transaction manager is created.
}
]} />
##### Returns
#### Returns
Promise&#60;TResult&#62;
@@ -246,13 +266,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={[
{
@@ -284,7 +304,7 @@ Authorizes the payment sessions of a payment collection.
}
]} />
##### Returns
#### Returns
Promise&#60;[PaymentCollection](PaymentCollection.mdx)&#62;
@@ -302,13 +322,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={[
{
@@ -322,7 +342,7 @@ Creates a new payment collection.
}
]} />
##### Returns
#### Returns
Promise&#60;[PaymentCollection](PaymentCollection.mdx)&#62;
@@ -340,13 +360,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={[
{
@@ -360,7 +380,7 @@ Deletes a payment collection.
}
]} />
##### Returns
#### Returns
Promise&#60;undefined \| [PaymentCollection](PaymentCollection.mdx)&#62;
@@ -378,11 +398,11 @@ Promise&#60;undefined \| [PaymentCollection](PaymentCollection.mdx)&#62;
___
#### isValidTotalAmount
### isValidTotalAmount
`Private **isValidTotalAmount**(total, sessionsInput): boolean`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -405,7 +425,7 @@ ___
}
]} />
##### Returns
#### Returns
`boolean`
@@ -423,13 +443,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={[
{
@@ -443,7 +463,7 @@ Marks a payment collection as authorized bypassing the payment flow.
}
]} />
##### Returns
#### Returns
Promise&#60;[PaymentCollection](PaymentCollection.mdx)&#62;
@@ -461,13 +481,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={[
{
@@ -499,7 +519,7 @@ Removes and recreate a payment session of a payment collection.
}
]} />
##### Returns
#### Returns
Promise&#60;[PaymentSession](PaymentSession.mdx)&#62;
@@ -517,13 +537,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={[
{
@@ -546,7 +566,7 @@ Retrieves a payment collection by id.
}
]} />
##### Returns
#### Returns
Promise&#60;[PaymentCollection](PaymentCollection.mdx)&#62;
@@ -564,13 +584,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={[
{
@@ -602,7 +622,7 @@ Manages a single payment sessions of a payment collection.
}
]} />
##### Returns
#### Returns
Promise&#60;[PaymentCollection](PaymentCollection.mdx)&#62;
@@ -620,13 +640,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={[
{
@@ -658,7 +678,7 @@ Manages multiple payment sessions of a payment collection.
}
]} />
##### Returns
#### Returns
Promise&#60;[PaymentCollection](PaymentCollection.mdx)&#62;
@@ -676,11 +696,11 @@ Promise&#60;[PaymentCollection](PaymentCollection.mdx)&#62;
___
#### shouldRetryTransaction\_
### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -694,7 +714,7 @@ ___
}
]} />
##### Returns
#### Returns
`boolean`
@@ -712,13 +732,13 @@ ___
___
#### update
### update
`**update**(paymentCollectionId, data): Promise&#60;[PaymentCollection](PaymentCollection.mdx)&#62;`
Updates a payment collection.
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -741,7 +761,7 @@ Updates a payment collection.
}
]} />
##### Returns
#### Returns
Promise&#60;[PaymentCollection](PaymentCollection.mdx)&#62;
@@ -759,11 +779,11 @@ Promise&#60;[PaymentCollection](PaymentCollection.mdx)&#62;
___
#### withTransaction
### withTransaction
`**withTransaction**(transactionManager?): [PaymentCollectionService](PaymentCollectionService.mdx)`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -777,7 +797,7 @@ ___
}
]} />
##### Returns
#### Returns
[PaymentCollectionService](PaymentCollectionService.mdx)
@@ -8,14 +8,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
A payment provider represents a payment service installed in the Medusa backend, either through a plugin or backend customizations. It holds the payment service's installation status.
## Constructors
#### constructor
## constructor
`**new PaymentProvider**()`
A payment provider represents a payment service installed in the Medusa backend, either through a plugin or backend customizations. It holds the payment service's installation status.
___
## Properties
<ParameterTypes parameters={[
@@ -8,13 +8,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
Helps retrieve payment providers
## Constructors
#### constructor
## constructor
`**new PaymentProviderService**(container)`
##### Parameters
### Parameters
<ParameterTypes parameters={[
{
@@ -28,6 +26,8 @@ Helps retrieve payment providers
}
]} />
___
## Properties
<ParameterTypes parameters={[
@@ -150,21 +150,57 @@ Helps retrieve payment providers
}
]} />
___
## Accessors
#### activeManager\_
### activeManager\_
`Protected` **activeManager\_**: [object Object]
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
#### paymentService\_
### paymentService\_
`Protected` **paymentService\_**: [object Object]
`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": []
}
]} />
___
## Methods
#### atomicPhase\_
### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -172,7 +208,7 @@ 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
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -195,7 +231,7 @@ transaction manager is created.
}
]} />
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -227,7 +263,7 @@ transaction manager is created.
}
]} />
##### Returns
#### Returns
Promise&#60;TResult&#62;
@@ -245,11 +281,11 @@ Promise&#60;TResult&#62;
___
#### authorizePayment
### authorizePayment
`**authorizePayment**(paymentSession, context): Promise&#60;undefined \| [PaymentSession](PaymentSession.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -272,7 +308,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;undefined \| [PaymentSession](PaymentSession.mdx)&#62;
@@ -290,13 +326,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={[
{
@@ -310,7 +346,7 @@ Build the create session context for both legacy and new API
}
]} />
##### Returns
#### Returns
[Cart](Cart.mdx) & [PaymentContext](../types/PaymentContext.mdx)
@@ -328,11 +364,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={[
{
@@ -346,7 +382,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[Payment](Payment.mdx)&#62;
@@ -364,11 +400,11 @@ Promise&#60;[Payment](Payment.mdx)&#62;
___
#### capturePayment
### capturePayment
`**capturePayment**(paymentObj): Promise&#60;[Payment](Payment.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -382,7 +418,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[Payment](Payment.mdx)&#62;
@@ -400,11 +436,11 @@ Promise&#60;[Payment](Payment.mdx)&#62;
___
#### createPayment
### createPayment
`**createPayment**(data): Promise&#60;[Payment](Payment.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -418,7 +454,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[Payment](Payment.mdx)&#62;
@@ -436,11 +472,11 @@ Promise&#60;[Payment](Payment.mdx)&#62;
___
#### createSession
### createSession
`**createSession**(providerId, cart): Promise&#60;[PaymentSession](PaymentSession.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -463,7 +499,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[PaymentSession](PaymentSession.mdx)&#62;
@@ -485,7 +521,7 @@ Promise&#60;[PaymentSession](PaymentSession.mdx)&#62;
Creates a payment session with the given provider.
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -499,7 +535,7 @@ Creates a payment session with the given provider.
}
]} />
##### Returns
#### Returns
Promise&#60;[PaymentSession](PaymentSession.mdx)&#62;
@@ -517,11 +553,11 @@ Promise&#60;[PaymentSession](PaymentSession.mdx)&#62;
___
#### deleteSession
### deleteSession
`**deleteSession**(paymentSession): Promise&#60;undefined \| [PaymentSession](PaymentSession.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -535,7 +571,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;undefined \| [PaymentSession](PaymentSession.mdx)&#62;
@@ -553,11 +589,11 @@ Promise&#60;undefined \| [PaymentSession](PaymentSession.mdx)&#62;
___
#### getStatus
### getStatus
`**getStatus**(payment): Promise&#60;[PaymentSessionStatus](../enums/PaymentSessionStatus.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -571,7 +607,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[PaymentSessionStatus](../enums/PaymentSessionStatus.mdx)&#62;
@@ -589,11 +625,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;
@@ -611,13 +647,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={[
{
@@ -640,7 +676,7 @@ List all the payments according to the given selector and config.
}
]} />
##### Returns
#### Returns
Promise&#60;[Payment](Payment.mdx)[]&#62;
@@ -658,13 +694,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={[
{
@@ -705,7 +741,7 @@ Process the collected data. Can be used every time we need to process some colle
}
]} />
##### Returns
#### Returns
Promise&#60;void&#62;
@@ -723,14 +759,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={[
{
@@ -780,7 +816,7 @@ This means, that we delete the current one and create a new.
}
]} />
##### Returns
#### Returns
Promise&#60;[PaymentSession](PaymentSession.mdx)&#62;
@@ -798,11 +834,11 @@ Promise&#60;[PaymentSession](PaymentSession.mdx)&#62;
___
#### refundFromPayment
### refundFromPayment
`**refundFromPayment**(payment, amount, reason, note?): Promise&#60;[Refund](Refund.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -843,7 +879,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[Refund](Refund.mdx)&#62;
@@ -861,11 +897,11 @@ Promise&#60;[Refund](Refund.mdx)&#62;
___
#### refundPayment
### refundPayment
`**refundPayment**(payObjs, amount, reason, note?): Promise&#60;[Refund](Refund.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -906,7 +942,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[Refund](Refund.mdx)&#62;
@@ -924,11 +960,11 @@ Promise&#60;[Refund](Refund.mdx)&#62;
___
#### registerInstalledProviders
### registerInstalledProviders
`**registerInstalledProviders**(providerIds): Promise&#60;void&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -942,7 +978,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;void&#62;
@@ -960,13 +996,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={[
{
@@ -989,7 +1025,7 @@ Retrieve a payment entity with the given id.
}
]} />
##### Returns
#### Returns
Promise&#60;[Payment](Payment.mdx)&#62;
@@ -1007,13 +1043,13 @@ 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
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -1027,7 +1063,7 @@ Finds a provider given an id
}
]} />
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -1041,7 +1077,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`
@@ -1059,11 +1095,11 @@ Finds a provider given an id
___
#### retrieveRefund
### retrieveRefund
`**retrieveRefund**(id, config?): Promise&#60;[Refund](Refund.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -1086,7 +1122,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[Refund](Refund.mdx)&#62;
@@ -1104,13 +1140,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={[
{
@@ -1133,7 +1169,7 @@ Return the payment session for the given id.
}
]} />
##### Returns
#### Returns
Promise&#60;[PaymentSession](PaymentSession.mdx)&#62;
@@ -1151,13 +1187,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={[
{
@@ -1243,7 +1279,7 @@ Create or update a Payment session data.
}
]} />
##### Returns
#### Returns
Promise&#60;[PaymentSession](PaymentSession.mdx)&#62;
@@ -1261,11 +1297,11 @@ Promise&#60;[PaymentSession](PaymentSession.mdx)&#62;
___
#### shouldRetryTransaction\_
### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -1279,7 +1315,7 @@ ___
}
]} />
##### Returns
#### Returns
`boolean`
@@ -1297,11 +1333,11 @@ ___
___
#### throwFromPaymentProcessorError
### throwFromPaymentProcessorError
`Private **throwFromPaymentProcessorError**(errObj): void`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -1315,7 +1351,7 @@ ___
}
]} />
##### Returns
#### Returns
`void`
@@ -1333,11 +1369,11 @@ ___
___
#### updatePayment
### updatePayment
`**updatePayment**(paymentId, data): Promise&#60;[Payment](Payment.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -1378,7 +1414,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[Payment](Payment.mdx)&#62;
@@ -1396,13 +1432,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={[
{
@@ -1452,7 +1488,7 @@ Update a payment session with the given provider.
}
]} />
##### Returns
#### Returns
Promise&#60;[PaymentSession](PaymentSession.mdx)&#62;
@@ -1470,11 +1506,11 @@ Promise&#60;[PaymentSession](PaymentSession.mdx)&#62;
___
#### updateSessionData
### updateSessionData
`**updateSessionData**(paymentSession, data): Promise&#60;[PaymentSession](PaymentSession.mdx)&#62;`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -1497,7 +1533,7 @@ ___
}
]} />
##### Returns
#### Returns
Promise&#60;[PaymentSession](PaymentSession.mdx)&#62;
@@ -1515,11 +1551,11 @@ Promise&#60;[PaymentSession](PaymentSession.mdx)&#62;
___
#### withTransaction
### withTransaction
`**withTransaction**(transactionManager?): [PaymentProviderService](PaymentProviderService.mdx)`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -1533,7 +1569,7 @@ ___
}
]} />
##### Returns
#### Returns
[PaymentProviderService](PaymentProviderService.mdx)
@@ -6,13 +6,11 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
# PaymentService
## Constructors
#### constructor
## constructor
`**new PaymentService**(«destructured»)`
##### Parameters
### Parameters
<ParameterTypes parameters={[
{
@@ -26,6 +24,8 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
}
]} />
___
## Properties
<ParameterTypes parameters={[
@@ -166,15 +166,35 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
}
]} />
___
## Accessors
#### activeManager\_
### activeManager\_
`Protected` **activeManager\_**: [object Object]
`Protected get**activeManager_**(): EntityManager`
#### Returns
EntityManager
<ParameterTypes parameters={[
{
"name": "EntityManager",
"type": "EntityManager",
"optional": false,
"defaultValue": "",
"description": "",
"expandable": false,
"children": []
}
]} />
___
## Methods
#### atomicPhase\_
### atomicPhase\_
`Protected **atomicPhase_**<TypeParameter TResult, TypeParameter TError>(work, isolationOrErrorHandler?, maybeErrorHandlerOrDontFail?): Promise&#60;TResult&#62;`
@@ -182,7 +202,7 @@ 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
#### Type Parameters
<ParameterTypes parameters={[
{
@@ -205,7 +225,7 @@ transaction manager is created.
}
]} />
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -237,7 +257,7 @@ transaction manager is created.
}
]} />
##### Returns
#### Returns
Promise&#60;TResult&#62;
@@ -255,13 +275,13 @@ Promise&#60;TResult&#62;
___
#### capture
### capture
`**capture**(paymentOrId): Promise&#60;[Payment](Payment.mdx)&#62;`
Captures a payment.
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -275,7 +295,7 @@ Captures a payment.
}
]} />
##### Returns
#### Returns
Promise&#60;[Payment](Payment.mdx)&#62;
@@ -293,13 +313,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={[
{
@@ -313,7 +333,7 @@ Created a new payment.
}
]} />
##### Returns
#### Returns
Promise&#60;[Payment](Payment.mdx)&#62;
@@ -331,13 +351,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={[
{
@@ -378,7 +398,7 @@ refunds a payment.
}
]} />
##### Returns
#### Returns
Promise&#60;[Refund](Refund.mdx)&#62;
@@ -396,13 +416,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={[
{
@@ -425,7 +445,7 @@ Retrieves a payment by id.
}
]} />
##### Returns
#### Returns
Promise&#60;[Payment](Payment.mdx)&#62;
@@ -443,11 +463,11 @@ Promise&#60;[Payment](Payment.mdx)&#62;
___
#### shouldRetryTransaction\_
### shouldRetryTransaction\_
`Protected **shouldRetryTransaction_**(err): boolean`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -461,7 +481,7 @@ ___
}
]} />
##### Returns
#### Returns
`boolean`
@@ -479,13 +499,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={[
{
@@ -526,7 +546,7 @@ Updates a payment in order to link it to an order or a swap.
}
]} />
##### Returns
#### Returns
Promise&#60;[Payment](Payment.mdx)&#62;
@@ -544,11 +564,11 @@ Promise&#60;[Payment](Payment.mdx)&#62;
___
#### withTransaction
### withTransaction
`**withTransaction**(transactionManager?): [PaymentService](PaymentService.mdx)`
##### Parameters
#### Parameters
<ParameterTypes parameters={[
{
@@ -562,7 +582,7 @@ ___
}
]} />
##### Returns
#### Returns
[PaymentService](PaymentService.mdx)
Loaded 100 of 1479 files, more files were not shown because too many files have changed in this diff. Show more