| @@ 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 |
|
| @@ 512-530 (lines=19) @@ | ||
| 509 | * @param ExemptTax[] $exemptTaxes |
|
| 510 | * @return PricingOptionGroup[] |
|
| 511 | */ |
|
| 512 | protected static function loadExemptTaxes($exemptTaxes) |
|
| 513 | { |
|
| 514 | $opt = []; |
|
| 515 | ||
| 516 | if (!empty($exemptTaxes)) { |
|
| 517 | $po = new PricingOptionGroup(PricingOptionKey::OPTION_EXEMPT_FROM_TAX); |
|
| 518 | ||
| 519 | foreach ($exemptTaxes as $tax) { |
|
| 520 | $po->taxInformation[] = new TaxInformation( |
|
| 521 | $tax->countryCode, |
|
| 522 | $tax->taxNature |
|
| 523 | ); |
|
| 524 | } |
|
| 525 | ||
| 526 | $opt[] = $po; |
|
| 527 | } |
|
| 528 | ||
| 529 | return $opt; |
|
| 530 | } |
|
| 531 | ||
| 532 | /** |
|
| 533 | * @param \DateTime|null $pastDate |
|