| @@ 393-411 (lines=19) @@ | ||
| 390 | * @param ExemptTax[] $exemptTaxes |
|
| 391 | * @return PricingOption[] |
|
| 392 | */ |
|
| 393 | protected function loadExemptTaxes($exemptTaxes) |
|
| 394 | { |
|
| 395 | $opt = []; |
|
| 396 | ||
| 397 | if (!empty($exemptTaxes)) { |
|
| 398 | $po = new PricingOption(PricingOptionKey::OPTION_EXEMPT_TAXES); |
|
| 399 | ||
| 400 | foreach ($exemptTaxes as $tax) { |
|
| 401 | $po->taxInformation[] = new TaxInformation( |
|
| 402 | $tax->countryCode, |
|
| 403 | $tax->taxNature |
|
| 404 | ); |
|
| 405 | } |
|
| 406 | ||
| 407 | $opt[] = $po; |
|
| 408 | } |
|
| 409 | ||
| 410 | return $opt; |
|
| 411 | } |
|
| 412 | ||
| 413 | /** |
|
| 414 | * @param string|null $currency |
|
| @@ 558-576 (lines=19) @@ | ||
| 555 | * @param ExemptTax[] $exemptTaxes |
|
| 556 | * @return PricingOptionGroup[] |
|
| 557 | */ |
|
| 558 | protected static function loadExemptTaxes($exemptTaxes) |
|
| 559 | { |
|
| 560 | $opt = []; |
|
| 561 | ||
| 562 | if (!empty($exemptTaxes)) { |
|
| 563 | $po = new PricingOptionGroup(PricingOptionKey::OPTION_EXEMPT_FROM_TAX); |
|
| 564 | ||
| 565 | foreach ($exemptTaxes as $tax) { |
|
| 566 | $po->taxInformation[] = new TaxInformation( |
|
| 567 | $tax->countryCode, |
|
| 568 | $tax->taxNature |
|
| 569 | ); |
|
| 570 | } |
|
| 571 | ||
| 572 | $opt[] = $po; |
|
| 573 | } |
|
| 574 | ||
| 575 | return $opt; |
|
| 576 | } |
|
| 577 | ||
| 578 | /** |
|
| 579 | * @param \DateTime|null $pastDate |
|