Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow filter by location without limit to airport or city #441

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

joseayram
Copy link

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
                ])
            ])
        ]
    ]);

@DerMika
Copy link
Collaborator

DerMika commented Aug 22, 2021

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

@joseayram
Copy link
Author

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants