Property | Type | Description | |
---|---|---|---|
$taxTypeRepository | The tax type repository. |
Method | Description | |
---|---|---|
__construct ( CommerceGuys\Tax\Repository\TaxTypeRepositoryInterface $taxTypeRepository ) | Creates a EuTaxTypeResolver instance. | |
resolve ( CommerceGuys\Tax\TaxableInterface $taxable, |
Method | Description | |
---|---|---|
filterByAddress ( array $taxTypes, CommerceGuys\Addressing\AddressInterface $address ) : CommerceGuys\Tax\Model\TaxTypeInterface[] | Filters out tax types not matching the provided address. | |
getTaxTypes ( ) : CommerceGuys\Tax\Model\TaxTypeInterface[] | Returns the EU tax types. |
public __construct ( CommerceGuys\Tax\Repository\TaxTypeRepositoryInterface $taxTypeRepository ) | ||
$taxTypeRepository | CommerceGuys\Tax\Repository\TaxTypeRepositoryInterface | The tax type repository. |
protected filterByAddress ( array $taxTypes, CommerceGuys\Addressing\AddressInterface $address ) : CommerceGuys\Tax\Model\TaxTypeInterface[] | ||
$taxTypes | array | The tax types to filter. |
$address | CommerceGuys\Addressing\AddressInterface | The address to filter by. |
return | CommerceGuys\Tax\Model\TaxTypeInterface[] | An array of tax types whose zones match the provided address. |
protected getTaxTypes ( ) : CommerceGuys\Tax\Model\TaxTypeInterface[] | ||
return | CommerceGuys\Tax\Model\TaxTypeInterface[] | An array of EU tax types. |
public resolve ( CommerceGuys\Tax\TaxableInterface $taxable, |
||
$taxable | CommerceGuys\Tax\TaxableInterface | |
$context |