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