import { Request } from 'express' ; import { IConfig } from 'config' ; abstract class AbstractCartProxy { protected _request : Request ; protected _config : IConfig ; public api : Record < string , Record < string , Function > > ; protected constructor ( config , req ) { this . _config = config ; this . _request = req ; } public create ( customerToken ) { throw new Error ( 'AbstractCartProxy::create must be implemented for specific platform' ) ; } public update ( customerToken , cartId , cartItem ) { throw new Error ( 'AbstractCartProxy::update must be implemented for specific platform' ) ; } public applyCoupon ( customerToken , cartId , coupon ) { throw new Error ( 'AbstractCartProxy::applyCoupon must be implemented for specific platform' ) ; } public deleteCoupon ( customerToken , cartId ) { throw new Error ( 'AbstractCartProxy::deleteCoupon must be implemented for specific platform' ) ; } public getCoupon ( customerToken , cartId ) { throw new Error ( 'AbstractCartProxy::getCoupon must be implemented for specific platform' ) ; } public delete ( customerToken , cartId , cartItem ) { throw new Error ( 'AbstractCartProxy::delete must be implemented for specific platform' ) ; } public pull ( customerToken , cartId , params ) { throw new Error ( 'AbstractCartProxy::pull must be implemented for specific platform' ) ; } public totals ( customerToken , cartId , params ) { throw new Error ( 'AbstractCartProxy::totals must be implemented for specific platform' ) ; } public getShippingMethods ( customerToken , cartId , address ) { throw new Error ( 'AbstractCartProxy::getShippingMethods must be implemented for specific platform' ) ; } public getPaymentMethods ( customerToken , cartId ) { throw new Error ( 'AbstractCartProxy::getPaymentMethods must be implemented for specific platform' ) ; } public setShippingInformation ( customerToken , cartId , address ) { throw new Error ( 'AbstractCartProxy::setShippingInformation must be implemented for specific platform' ) ; } public collectTotals ( customerToken , cartId , shippingMethod ) { throw new Error ( 'AbstractCartProxy::collectTotals must be implemented for specific platform' ) ; } } export default AbstractCartProxy ;