Как указать PriceComparison.AmountSpecified в CreatePassengerNameRecordRequest? - PullRequest
0 голосов
/ 22 января 2020

Я хочу создать PNR для нижеуказанного маршрута, возвращаемого BFM. Поиск:

"itineraries": [
                    {
                        "id": 1,
                        "pricingSource": "ADVJR1",
                        "legs": [
                            {
                                "ref": 24
                            }
                        ],
                        "pricingInformation": [
                            {
                                "pricingSubsource": "MIP",
                                "fare": {
                                    "validatingCarrierCode": "KE",
                                    "vita": true,
                                    "eTicketable": true,
                                    "governingCarriers": "OZ",
                                    "passengerInfoList": [
                                        {
                                            "passengerInfo": {
                                                "passengerType": "ADT",
                                                "passengerNumber": 1,
                                                "nonRefundable": false,
                                                "fareComponents": [
                                                    {
                                                        "ref": 7,
                                                        "segments": [
                                                            {
                                                                "segment": {
                                                                    "bookingCode": "P",
                                                                    "cabinCode": "P",
                                                                    "mealCode": "B",
                                                                    "seatsAvailable": 4,
                                                                    "availabilityBreak": true
                                                                }
                                                            }
                                                        ]
                                                    },
                                                    {
                                                        "ref": 2,
                                                        "segments": [
                                                            {
                                                                "segment": {
                                                                    "bookingCode": "Z",
                                                                    "cabinCode": "C",
                                                                    "mealCode": "BD",
                                                                    "seatsAvailable": 9,
                                                                    "availabilityBreak": true
                                                                }
                                                            }
                                                        ]
                                                    }
                                                ],
                                                "taxes": [
                                                    ...
                                                ],
                                                "taxSummaries": [
                                                    ...
                                                ],
                                                "currencyConversion": {
                                                    "from": "SGD",
                                                    "to": "USD",
                                                    "exchangeRateUsed": 0.7423176
                                                },
                                                "fareMessages": [
                                                    {
                                                        "type": "N",
                                                        "code": "0",
                                                        "carrier": "KE",
                                                        "info": "NONENDS."
                                                    },
                                                    {
                                                        "type": "N",
                                                        "code": "0",
                                                        "carrier": "OZ",
                                                        "info": "NONENDS/MILE UG J/C/D/Y/B/M ONLY"
                                                    },
                                                    {
                                                        "type": "W",
                                                        "code": "0",
                                                        "info": "VALIDATING CARRIER - KE"
                                                    }
                                                ],
                                                "passengerTotalFare": {
                                                    "totalFare": 4616.95,
                                                    "totalTaxAmount": 188.95,
                                                    "currency": "USD",
                                                    "baseFareAmount": 5965.00,
                                                    "baseFareCurrency": "SGD",
                                                    "equivalentAmount": 4428.00,
                                                    "equivalentCurrency": "USD",
                                                    "constructionAmount": 4378.12,
                                                    "constructionCurrency": "NUC",
                                                    "commissionPercentage": 0.00,
                                                    "commissionAmount": 0.00,
                                                    "exchangeRateOne": 1.36234400
                                                },
                                                "baggageInformation": [
                                                    {
                                                        "provisionType": "A",
                                                        "airlineCode": "KE",
                                                        "segments": [
                                                            {
                                                                "id": 0
                                                            },
                                                            {
                                                                "id": 1
                                                            }
                                                        ],
                                                        "allowance": {
                                                            "ref": 10
                                                        }
                                                    }
                                                ]
                                            }
                                        }
                                    ],
                                    "totalFare": {
                                        "totalPrice": 4616.95,
                                        "totalTaxAmount": 188.95,
                                        "currency": "USD",
                                        "baseFareAmount": 5965.00,
                                        "baseFareCurrency": "SGD",
                                        "constructionAmount": 4378.12,
                                        "constructionCurrency": "NUC",
                                        "equivalentAmount": 4428.00,
                                        "equivalentCurrency": "USD"
                                    },
                                    "validatingCarriers": [
                                        {
                                            "ref": 12
                                        }
                                    ]
                                }
                            }
                        ]
                    }

Я хочу, чтобы запрос на создание PNR не выполнялся, если тариф на момент создания PNR превышает цену когда я искал, скажем, 10 единиц. Согласно документации это очень просто, просто установите сравнение цен:

                "PriceComparison": {
                    "AcceptablePriceIncrease": {
                        "Amount": 10,
                        "HaltOnNonAcceptablePrice": true
                    },
                    "AmountSpecified": 4616.95
                }

Я дал сумму "AmountSpecified": 4616.95, поскольку totalFare в поиске составляет 4616,95

Возвращенный успешный ответ PNR имеет следующее:

               "PriceComparison": {
                    "AmountReturned": "2069.70",
                    "AmountSpecified": "4616.95"
                },

Когда я запустил BFM Search, общая стоимость маршрута составила 4616,95, я не понимаю, почему AmountReturned составляет 2069,70.

I далее попытался уменьшить значение AmountSpecified до значений выше 2059,70 (2069,70–10), а HaltOnNonAcceptablePrice срабатывает только ниже 2059,70. Как рассчитывается AmountSpecified? Почему эта сумма возвращается намного меньше, чем общая цена в ответе BFM?

...