-
Notifications
You must be signed in to change notification settings - Fork 0
/
interfaces.go
65 lines (59 loc) · 1.68 KB
/
interfaces.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
package registry
import (
"github.com/driver005/gateway/interfaces"
"github.com/driver005/gateway/strategies"
)
func (m *Base) PriceSelectionStrategy() interfaces.IPriceSelectionStrategy {
if m.priceSelectionStrategy == nil {
m.priceSelectionStrategy = strategies.NewPriceSelectionStrategy(m)
}
return m.priceSelectionStrategy
}
func (m *Base) TaxCalculationStrategy() interfaces.ITaxCalculationStrategy {
if m.taxCalculationStrategy == nil {
m.taxCalculationStrategy = strategies.NewTaxCalculationStrategy(m)
}
return m.taxCalculationStrategy
}
func (m *Base) InventoryService() interfaces.IInventoryService {
if m.inventoryService == nil {
m.inventoryService = nil
}
return m.inventoryService
}
func (m *Base) StockLocationService() interfaces.IStockLocationService {
if m.stockLocationService == nil {
m.stockLocationService = nil
}
return m.stockLocationService
}
func (m *Base) CacheService() interfaces.ICacheService {
if m.cacheService == nil {
m.cacheService = nil
}
return m.cacheService
}
func (m *Base) PricingModuleService() interfaces.IPricingModuleService {
if m.pricingModuleService == nil {
m.pricingModuleService = nil
}
return m.pricingModuleService
}
func (m *Base) FileService() interfaces.IFileService {
if m.fileService == nil {
m.fileService = nil
}
return m.fileService
}
func (m *Base) BatchJobStrategy() interfaces.IBatchJobStrategy {
if m.batchJobStrategy == nil {
m.batchJobStrategy = nil
}
return m.batchJobStrategy
}
func (m *Base) CartCompletionStrategy() interfaces.ICartCompletionStrategy {
if m.cartCompletionStrategy == nil {
m.cartCompletionStrategy = strategies.NewCartCompletionStrategy(m)
}
return m.cartCompletionStrategy
}