Skip to main content

Class: FulfillmentProviderService

Helps retrive fulfillment providers

Constructors

constructor

new FulfillmentProviderService(container)

Parameters

NameType
containerany

Defined in

services/fulfillment-provider.js:7

Methods

calculatePrice

calculatePrice(option, data, cart): Promise<any>

Parameters

NameType
optionany
dataany
cartany

Returns

Promise<any>

Defined in

services/fulfillment-provider.js:79


canCalculate

canCalculate(option): Promise<any>

Parameters

NameType
optionany

Returns

Promise<any>

Defined in

services/fulfillment-provider.js:64


cancelFulfillment

cancelFulfillment(fulfillment): Promise<any>

Parameters

NameType
fulfillmentany

Returns

Promise<any>

Defined in

services/fulfillment-provider.js:74


createFulfillment

createFulfillment(method, items, order, fulfillment): Promise<any>

Parameters

NameType
methodany
itemsany
orderany
fulfillmentany

Returns

Promise<any>

Defined in

services/fulfillment-provider.js:59


createReturn

createReturn(returnOrder): Promise<any>

Parameters

NameType
returnOrderany

Returns

Promise<any>

Defined in

services/fulfillment-provider.js:89


list

list(): Promise<any>

Returns

Promise<any>

Defined in

services/fulfillment-provider.js:23


listFulfillmentOptions

listFulfillmentOptions(providers): Promise<any[]>

Parameters

NameType
providersany

Returns

Promise<any[]>

Defined in

services/fulfillment-provider.js:30


registerInstalledProviders

registerInstalledProviders(providers): Promise<void>

Parameters

NameType
providersany

Returns

Promise<void>

Defined in

services/fulfillment-provider.js:12


retrieveDocuments

retrieveDocuments(providerId, fulfillmentData, documentType): Promise<any>

Fetches documents from the fulfillment provider

Parameters

NameTypeDescription
providerIdstringthe id of the provider
fulfillmentDataanythe data relating to the fulfillment
documentType"invoice" | "label"the typ of document to fetch

Returns

Promise<any>

Defined in

services/fulfillment-provider.js:102


retrieveProvider

retrieveProvider(provider_id): FulfillmentService

Parameters

NameTypeDescription
provider_idstringthe provider id

Returns

FulfillmentService

the payment fulfillment provider

Defined in

services/fulfillment-provider.js:48


validateFulfillmentData

validateFulfillmentData(option, data, cart): Promise<any>

Parameters

NameType
optionany
dataany
cartany

Returns

Promise<any>

Defined in

services/fulfillment-provider.js:69


validateOption

validateOption(option): Promise<any>

Parameters

NameType
optionany

Returns

Promise<any>

Defined in

services/fulfillment-provider.js:84