| @@ 262-278 (lines=17) @@ | ||
| 259 | * @param string|null $posOverride |
|
| 260 | * @return PricingOption[] |
|
| 261 | */ |
|
| 262 | protected static function loadPointOverrides($posOverride) |
|
| 263 | { |
|
| 264 | $opt = []; |
|
| 265 | ||
| 266 | if (!empty($posOverride)) { |
|
| 267 | $po = new PricingOption(PricingOptionKey::OVERRIDE_POINT_OF_SALE); |
|
| 268 | ||
| 269 | $po->locationInformation = new LocationInformation( |
|
| 270 | LocationInformation::TYPE_POINT_OF_SALE, |
|
| 271 | $posOverride |
|
| 272 | ); |
|
| 273 | ||
| 274 | $opt[] = $po; |
|
| 275 | } |
|
| 276 | ||
| 277 | return $opt; |
|
| 278 | } |
|
| 279 | ||
| 280 | /** |
|
| 281 | * @param FormOfPayment[] $formOfPayment |
|
| @@ 284-297 (lines=14) @@ | ||
| 281 | * @param FormOfPayment[] $formOfPayment |
|
| 282 | * @return PricingOption[] |
|
| 283 | */ |
|
| 284 | protected static function loadFormOfPaymentOverride($formOfPayment) |
|
| 285 | { |
|
| 286 | $opt = []; |
|
| 287 | ||
| 288 | if (!empty($formOfPayment)) { |
|
| 289 | $po = new PricingOption(PricingOptionKey::OVERRIDE_FORM_OF_PAYMENT); |
|
| 290 | ||
| 291 | $po->formOfPaymentInformation = new FormOfPaymentInformation($formOfPayment); |
|
| 292 | ||
| 293 | $opt[] = $po; |
|
| 294 | } |
|
| 295 | ||
| 296 | return $opt; |
|
| 297 | } |
|
| 298 | ||
| 299 | /** |
|
| 300 | * @param FrequentFlyer[] $frequentFlyers |
|
| @@ 303-316 (lines=14) @@ | ||
| 300 | * @param FrequentFlyer[] $frequentFlyers |
|
| 301 | * @return PricingOption[] |
|
| 302 | */ |
|
| 303 | protected static function loadFrequentFlyerOverride($frequentFlyers) |
|
| 304 | { |
|
| 305 | $opt = []; |
|
| 306 | ||
| 307 | if (!empty($frequentFlyers)) { |
|
| 308 | $po = new PricingOption(PricingOptionKey::OVERRIDE_FREQUENT_FLYER_INFORMATION); |
|
| 309 | ||
| 310 | $po->frequentFlyerInformation = new FrequentFlyerInformation($frequentFlyers); |
|
| 311 | ||
| 312 | $opt[] = $po; |
|
| 313 | } |
|
| 314 | ||
| 315 | return $opt; |
|
| 316 | } |
|
| 317 | ||
| 318 | /** |
|
| 319 | * @param PaxSegRef[] $references |
|
| @@ 322-335 (lines=14) @@ | ||
| 319 | * @param PaxSegRef[] $references |
|
| 320 | * @return PricingOption[] |
|
| 321 | */ |
|
| 322 | protected static function loadReferences($references) |
|
| 323 | { |
|
| 324 | $opt = []; |
|
| 325 | ||
| 326 | if (!empty($references)) { |
|
| 327 | $po = new PricingOption(PricingOptionKey::OVERRIDE_PAX_SEG_ELEMENT_SELECTION); |
|
| 328 | ||
| 329 | $po->paxSegTstReference = new PaxSegTstReference($references); |
|
| 330 | ||
| 331 | $opt[] = $po; |
|
| 332 | } |
|
| 333 | ||
| 334 | return $opt; |
|
| 335 | } |
|
| 336 | ||
| 337 | /** |
|
| 338 | * @param string[] $overrideOptions |
|