amadeus-ws-client icon indicating copy to clipboard operation
amadeus-ws-client copied to clipboard

Allow filter by location without limit to airport or city

Open joseayram opened this issue 3 years ago • 4 comments

Hello!

Currently I am develop a project that involve the MasterPricerTravelBoardSearh and MasterPricerCalendar messages and I'm limited at the moment of filter by location without specify city or airport.

The consultant team of Amadeus said me that I need to filter the search without this limitation to get more results.

Adding «all» as a third parameter for this option, we can filter by city and airport in the same time.

$opt = new FareMasterPricerTbSearch([
        'nrOfRequestedResults' => 10,
        'nrOfRequestedPassengers' => 1,
        'passengers' => [
            new MPPassenger([
                'type' => MPPassenger::TYPE_ADULT,
                'count' => 1
            ]),
        ],
        'itinerary' => [
            new MPItinerary([
                'departureLocation' => new MPLocation(['all' => 'MVD']),
                'arrivalLocation' => new MPLocation(['all' => 'MIA']),
                'date' => new MPDate([
                    'dateTime' => new \DateTime('2021-09-15T10:00:00+0000', new \DateTimeZone('UTC')),
                    'timeWindow' => 5,
                    'rangeMode' => MPDate::RANGEMODE_MINUS_PLUS,
                    'range' => 1
                ])
            ]),
            new MPItinerary([
                'departureLocation' => new MPLocation(['all' => 'MIA']),
                'arrivalLocation' => new MPLocation(['all' => 'MVD']),
                'date' => new MPDate([
                    'dateTime' => new \DateTime('2021-09-30T18:00:00+0000', new \DateTimeZone('UTC')),
                    'timeWindow' => 5,
                    'rangeMode' => MPDate::RANGEMODE_PLUS,
                    'range' => 1
                ])
            ])
        ]
    ]);

joseayram avatar Aug 20 '21 21:08 joseayram

Can you please also add a sample to the docs at docs/samples/masterpricertravelboard.rst?

DerMika avatar Aug 22 '21 18:08 DerMika

Can you please also add a sample to the docs at docs/samples/masterpricertravelboard.rst?

Ready! I added a sample to the end of file. Let me know.

Thanks.

joseayram avatar Aug 22 '21 20:08 joseayram

Hello @DerMika! How are you? Is it ok the fix to this PR or Is it missing something more? Thanks

joseayram avatar Sep 24 '21 10:09 joseayram