You are here

public function TaxRateResolverInterface::resolve in Commerce Core 8.2

Resolves the tax rate for the given tax zone.

Parameters

\Drupal\commerce_tax\TaxZone $zone: The tax zone.

\Drupal\commerce_order\Entity\OrderItemInterface $order_item: The order item.

\Drupal\profile\Entity\ProfileInterface $customer_profile: The customer profile. Contains the address and tax number.

Return value

\Drupal\commerce_tax\TaxRate|string|null The tax rate, NO_APPLICABLE_TAX_RATE, or NULL.

3 methods override TaxRateResolverInterface::resolve()
ChainTaxRateResolver::resolve in modules/tax/src/Resolver/ChainTaxRateResolver.php
Resolves the tax rate for the given tax zone.
DefaultTaxRateResolver::resolve in modules/tax/src/Resolver/DefaultTaxRateResolver.php
Resolves the tax rate for the given tax zone.
TaxRateResolver::resolve in modules/tax/tests/modules/commerce_tax_test/src/Resolver/TaxRateResolver.php
Resolves the tax rate for the given tax zone.

File

modules/tax/src/Resolver/TaxRateResolverInterface.php, line 31

Class

TaxRateResolverInterface
Defines the interface for tax rate resolvers.

Namespace

Drupal\commerce_tax\Resolver

Code

public function resolve(TaxZone $zone, OrderItemInterface $order_item, ProfileInterface $customer_profile);