Creates ShippingProfileService & ShippingOptionService (#30)
Adds ShippingProfiles: With Shipping Profiles store operators can group products together and select which shipping options can fulfill the products. The shipping profiles are region agnostic, but for products to be shippable to a given region the shipping profile must have a shipping option associated that ships to this region. Adds Shipping Options: Shipping Options represents a way that the customer can have their order shipped. The shipping option has a fulfillment provider associated to determine who fulfills orders with the given shipping method. If a fulfillment provider has multiple ways that they can ship a shipping option for each of the fulfillment provider's shipping options can be created.
This commit is contained in:
1 parent
aff1ec3390
commit
ea4185eddd
72 files changed
+3658
-370
No files matched your search
@@ -0,0 +1,38 @@
|
||||
import BaseService from "./base-service"
|
||||
|
||||
/**
|
||||
* The interface that all fulfillment services must inherit from. The intercace
|
||||
* provides the necessary methods for creating, authorizing and managing
|
||||
* fulfillment orders.
|
||||
* @interface
|
||||
*/
|
||||
class BaseFulfillmentService extends BaseService {
|
||||
constructor() {
|
||||
super()
|
||||
}
|
||||
|
||||
getFulfillmentOptions() {
|
||||
}
|
||||
|
||||
validateFulfillmentData(data, cart) {
|
||||
throw Error("validateFulfillmentData must be overridden by the child class")
|
||||
}
|
||||
|
||||
validateOption(data) {
|
||||
throw Error("validateOption must be overridden by the child class")
|
||||
}
|
||||
|
||||
canCalculate(data) {
|
||||
throw Error("canCalculate must be overridden by the child class")
|
||||
}
|
||||
|
||||
calculatePrice(data) {
|
||||
throw Error("calculatePrice must be overridden by the child class")
|
||||
}
|
||||
|
||||
createOrder() {
|
||||
throw Error("createOrder must be overridden by the child class")
|
||||
}
|
||||
}
|
||||
|
||||
export default BaseFulfillmentService
|
||||
@@ -1,3 +1,4 @@
|
||||
export { default as BaseService } from "./base-service"
|
||||
export { default as BaseModel } from "./base-model"
|
||||
export { default as PaymentService } from "./payment-service"
|
||||
export { default as FulfillmentService } from "./fulfillment-service"
|
||||
Reference in new issue
Block a user