FulfillmentProviderService
Helps retrieve fulfillment providers
Properties
__configModule__
Record<string, unknown>__container__
anyRequired__moduleDeclaration__
Record<string, unknown>manager_
EntityManagerRequiredtransactionManager_
undefined | EntityManagerRequiredAccessors
activeManager_
Returns
EntityManager
EntityManagerRequiredMethods
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
isolationOrErrorHandler
IsolationLevel | (error: TError) => Promise<void | TResult>the isolation level to be used for the work.
maybeErrorHandlerOrDontFail
(error: TError) => Promise<void | TResult>Potential error handler
Returns
Promise
Promise<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.
data
Record<string, unknown>RequiredReturns
Promise
Promise<number>RequiredcanCalculate
Parameters
Returns
Promise
Promise<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
Promise
Promise<Record<string, unknown>>RequiredcreateReturn
Parameters
Returns
Promise
Promise<Record<string, unknown>>Requiredlist
Returns
listFulfillmentOptions
Parameters
providerIds
string[]RequiredReturns
registerInstalledProviders
Parameters
providers
string[]RequiredReturns
Promise
Promise<void>RequiredretrieveDocuments
Fetches documents from the fulfillment provider
Parameters
providerId
stringRequiredthe id of the provider
fulfillmentData
Record<string, unknown>Requiredthe data relating to the fulfillment
documentType
"label" | "invoice"Requiredthe typ of
Returns
Promise
Promise<any>Requireddocument to fetch
retrieveProvider
Parameters
providerId
stringRequiredthe provider id
Returns
any
anythe payment fulfillment provider
shouldRetryTransaction_
Parameters
err
Record<string, unknown> | { code: string }RequiredReturns
boolean
booleanvalidateFulfillmentData
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.
data
Record<string, unknown>RequiredReturns
Promise
Promise<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
Promise
Promise<boolean>RequiredwithTransaction
Parameters
transactionManager
EntityManagerReturns
Was this section helpful?