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