| @@ 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 |
|
| @@ 544-562 (lines=19) @@ | ||
| 541 | * @param ExemptTax[] $exemptTaxes |
|
| 542 | * @return PricingOptionGroup[] |
|
| 543 | */ |
|
| 544 | protected static function loadExemptTaxes($exemptTaxes) |
|
| 545 | { |
|
| 546 | $opt = []; |
|
| 547 | ||
| 548 | if (!empty($exemptTaxes)) { |
|
| 549 | $po = new PricingOptionGroup(PricingOptionKey::OPTION_EXEMPT_FROM_TAX); |
|
| 550 | ||
| 551 | foreach ($exemptTaxes as $tax) { |
|
| 552 | $po->taxInformation[] = new TaxInformation( |
|
| 553 | $tax->countryCode, |
|
| 554 | $tax->taxNature |
|
| 555 | ); |
|
| 556 | } |
|
| 557 | ||
| 558 | $opt[] = $po; |
|
| 559 | } |
|
| 560 | ||
| 561 | return $opt; |
|
| 562 | } |
|
| 563 | ||
| 564 | /** |
|
| 565 | * @param \DateTime|null $pastDate |
|