FulfillmentProviderService
Helps retrieve fulfillment providers
Properties
__configModule__Record<string, unknown>__container__anyRequired__moduleDeclaration__Record<string, unknown>manager_EntityManagerRequiredtransactionManager_undefined | EntityManagerRequiredAccessors
activeManager_
Returns
EntityManagerEntityManagerRequiredMethods
atomicPhase_
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.
Parameters
work(transactionManager: EntityManager) => Promise<TResult>Requiredthe transactional work to be done
isolationOrErrorHandlerIsolationLevel | (error: TError) => Promise<void | TResult>the isolation level to be used for the work.
maybeErrorHandlerOrDontFail(error: TError) => Promise<void | TResult>Potential error handler
Returns
PromisePromise<TResult>Requiredthe result of the transactional work
calculatePrice
Parameters
A Shipping Option represents a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.
dataRecord<string, unknown>RequiredReturns
PromisePromise<number>RequiredcanCalculate
Parameters
Returns
PromisePromise<boolean>RequiredcancelFulfillment
Parameters
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.
Returns
createFulfillment
Parameters
A Shipping Method represents a way in which an Order or Return can be shipped. Shipping Methods are created from a Shipping Option, but may contain additional details that can be necessary for the Fulfillment Provider to handle the shipment. If the shipping method is created for a return, it may be associated with a claim or a swap that the return is part of.
Returns
PromisePromise<Record<string, unknown>>RequiredcreateReturn
Parameters
Returns
PromisePromise<Record<string, unknown>>Requiredlist
Returns
listFulfillmentOptions
Parameters
providerIdsstring[]RequiredReturns
registerInstalledProviders
Parameters
providersstring[]RequiredReturns
PromisePromise<void>RequiredretrieveDocuments
Fetches documents from the fulfillment provider
Parameters
providerIdstringRequiredthe id of the provider
fulfillmentDataRecord<string, unknown>Requiredthe data relating to the fulfillment
documentType"label" | "invoice"Requiredthe typ of
Returns
PromisePromise<any>Requireddocument to fetch
retrieveProvider
Parameters
providerIdstringRequiredthe provider id
Returns
anyanythe payment fulfillment provider
shouldRetryTransaction_
Parameters
errRecord<string, unknown> | { code: string }RequiredReturns
booleanbooleanvalidateFulfillmentData
Parameters
A Shipping Option represents a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.
dataRecord<string, unknown>RequiredReturns
PromisePromise<Record<string, unknown>>RequiredvalidateOption
Parameters
A Shipping Option represents a way in which an Order or Return can be shipped. Shipping Options have an associated Fulfillment Provider that will be used when the fulfillment of an Order is initiated. Shipping Options themselves cannot be added to Carts, but serve as a template for Shipping Methods. This distinction makes it possible to customize individual Shipping Methods with additional information.
Returns
PromisePromise<boolean>RequiredwithTransaction
Parameters
transactionManagerEntityManagerReturns
Was this section helpful?