initial commit
This commit is contained in:
19
pricing/pricing.go
Normal file
19
pricing/pricing.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package pricing
|
||||
|
||||
import "fmt"
|
||||
|
||||
type PricingService interface {
|
||||
Prices(vars map[string]any) (map[string]Price, error)
|
||||
}
|
||||
|
||||
func NewPricingService(implementation string) (PricingService, error) {
|
||||
switch implementation {
|
||||
case "mms43":
|
||||
return NewMMS43PricingService()
|
||||
case "pfm63":
|
||||
return NewPFM63PricingService()
|
||||
default:
|
||||
return nil, fmt.Errorf("pricing implementation %v is not supported", implementation)
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user