public function handle(ListTaxRatesQuery $query) { $request = $query->getRequest(); $taxRates = $this->taxRateService->findAll(); foreach ($taxRates as $taxRate) { $query->getResponse()->addTaxRateDTOBuilder($this->dtoBuilderFactory->getTaxRateDTOBuilder($taxRate)); } }
public function handle(SetCartTaxRateByZip5AndStateCommand $command) { $taxRate = $this->taxRateService->findByZip5AndState($command->getZip5(), $command->getState()); $this->cartService->setTaxRate($command->getCartId(), $taxRate); }