| @@ 285-301 (lines=17) @@ | ||
| 282 | * @param string|null $posOverride |
|
| 283 | * @return PricingOption[] |
|
| 284 | */ |
|
| 285 | protected static function loadPointOverrides($posOverride) |
|
| 286 | { |
|
| 287 | $opt = []; |
|
| 288 | ||
| 289 | if (!empty($posOverride)) { |
|
| 290 | $po = new PricingOption(PricingOptionKey::OVERRIDE_POINT_OF_SALE); |
|
| 291 | ||
| 292 | $po->locationInformation = new LocationInformation( |
|
| 293 | LocationInformation::TYPE_POINT_OF_SALE, |
|
| 294 | $posOverride |
|
| 295 | ); |
|
| 296 | ||
| 297 | $opt[] = $po; |
|
| 298 | } |
|
| 299 | ||
| 300 | return $opt; |
|
| 301 | } |
|
| 302 | ||
| 303 | /** |
|
| 304 | * @param FormOfPayment[] $formOfPayment |
|
| @@ 307-320 (lines=14) @@ | ||
| 304 | * @param FormOfPayment[] $formOfPayment |
|
| 305 | * @return PricingOption[] |
|
| 306 | */ |
|
| 307 | protected static function loadFormOfPaymentOverride($formOfPayment) |
|
| 308 | { |
|
| 309 | $opt = []; |
|
| 310 | ||
| 311 | if (!empty($formOfPayment)) { |
|
| 312 | $po = new PricingOption(PricingOptionKey::OVERRIDE_FORM_OF_PAYMENT); |
|
| 313 | ||
| 314 | $po->formOfPaymentInformation = new FormOfPaymentInformation($formOfPayment); |
|
| 315 | ||
| 316 | $opt[] = $po; |
|
| 317 | } |
|
| 318 | ||
| 319 | return $opt; |
|
| 320 | } |
|
| 321 | ||
| 322 | /** |
|
| 323 | * @param FrequentFlyer[] $frequentFlyers |
|
| @@ 326-339 (lines=14) @@ | ||
| 323 | * @param FrequentFlyer[] $frequentFlyers |
|
| 324 | * @return PricingOption[] |
|
| 325 | */ |
|
| 326 | protected static function loadFrequentFlyerOverride($frequentFlyers) |
|
| 327 | { |
|
| 328 | $opt = []; |
|
| 329 | ||
| 330 | if (!empty($frequentFlyers)) { |
|
| 331 | $po = new PricingOption(PricingOptionKey::OVERRIDE_FREQUENT_FLYER_INFORMATION); |
|
| 332 | ||
| 333 | $po->frequentFlyerInformation = new FrequentFlyerInformation($frequentFlyers); |
|
| 334 | ||
| 335 | $opt[] = $po; |
|
| 336 | } |
|
| 337 | ||
| 338 | return $opt; |
|
| 339 | } |
|
| 340 | ||
| 341 | /** |
|
| 342 | * @param PaxSegRef[] $references |
|
| @@ 345-358 (lines=14) @@ | ||
| 342 | * @param PaxSegRef[] $references |
|
| 343 | * @return PricingOption[] |
|
| 344 | */ |
|
| 345 | protected static function loadReferences($references) |
|
| 346 | { |
|
| 347 | $opt = []; |
|
| 348 | ||
| 349 | if (!empty($references)) { |
|
| 350 | $po = new PricingOption(PricingOptionKey::OVERRIDE_PAX_SEG_ELEMENT_SELECTION); |
|
| 351 | ||
| 352 | $po->paxSegTstReference = new PaxSegTstReference($references); |
|
| 353 | ||
| 354 | $opt[] = $po; |
|
| 355 | } |
|
| 356 | ||
| 357 | return $opt; |
|
| 358 | } |
|
| 359 | ||
| 360 | /** |
|
| 361 | * @param string[] $overrideOptions |
|