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

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

View File

@@ -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)