Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PriceCalculator ¶
type PriceCalculator struct {
// contains filtered or unexported fields
}
PriceCalculator estimates the VAT-inclusive retail prices of items.
func NewPriceCalculator ¶
func NewPriceCalculator(priceSvcEndpoint, vatSvcEndpoint string) *PriceCalculator
NewPriceCalculator creates a PriceCalculator instance that queries the provided endpoints for item price and VAT information.
func (*PriceCalculator) PriceForItem ¶
func (pc *PriceCalculator) PriceForItem(itemUUID string) (float64, error)
PriceForItem calculates the VAT-inclusive retail price of itemUUID with the currently applicable VAT rates.
func (*PriceCalculator) PriceForItemAtDate ¶
PriceForItemAtDate calculates the VAT-inclusive retail price of itemUUID with the VAT rates that applied at a particular date.
Click to show internal directories.
Click to hide internal directories.