Definition at line 15 of file TaxRateManagement.php.
◆ __construct()
- Parameters
-
TaxRuleRepositoryInterface | $taxRuleRepository | |
TaxRateRepositoryInterface | $taxRateRepository | |
FilterBuilder | $filterBuilder | |
SearchCriteriaBuilder | $searchCriteriaBuilder | |
Definition at line 43 of file TaxRateManagement.php.
◆ getRatesByCustomerAndProductTaxClassId()
getRatesByCustomerAndProductTaxClassId |
( |
|
$customerTaxClassId, |
|
|
|
$productTaxClassId |
|
) |
| |
{Get rates by customerTaxClassId and productTaxClassId
- Parameters
-
int | $customerTaxClassId | |
int | $productTaxClassId | |
- Returns
- TaxRateInterface[]
}
Implements TaxRateManagementInterface.
Definition at line 58 of file TaxRateManagement.php.
60 $this->searchCriteriaBuilder->addFilters(
63 ->setField(
'customer_tax_class_ids')
64 ->setValue([$customerTaxClassId])
69 $this->searchCriteriaBuilder->addFilters(
72 ->setField(
'product_tax_class_ids')
73 ->setValue([$productTaxClassId])
78 $searchResults = $this->taxRuleRepository->getList($this->searchCriteriaBuilder->create());
82 $rateIds =
$taxRule->getTaxRateIds();
83 if (!empty($rateIds)) {
84 foreach ($rateIds as $rateId) {
85 $rates[] = $this->taxRateRepository->get($rateId);
◆ $filterBuilder
◆ $searchCriteriaBuilder
◆ $taxRateRepository
◆ $taxRuleRepository
The documentation for this class was generated from the following file: