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

Pnr_AddMultiElements support for multiple optionCodes #34

Closed
bimusiek opened this issue Dec 13, 2016 · 6 comments
Closed

Pnr_AddMultiElements support for multiple optionCodes #34

bimusiek opened this issue Dec 13, 2016 · 6 comments

Comments

@bimusiek
Copy link
Collaborator

Hey, I see that you can only pass 1 action code to PnrCreatePnrOptions .
Can you tell me if it is possible to pass many options?

Via Amadeus TechRef for AddMultiElements you are able to pass up to 40 action codes, and my amadeus manager asked us to pass 3 codes :(

@DerMika
Copy link
Collaborator

DerMika commented Dec 13, 2016

Hi,

The actionCode in the message is the action code that will be sent as the XML node PNR_AddMultiElements/pnrActions/optionCode in the PNR_AddMultiElements message. If you check the XSD's on the Amadeus Web Services Extranet, you see that in theory the optionCode node can indeed occur up to 40 times according to the XSD definition, as you say.

However, in practice, I have never seen any example of a PNR_AddMultiElements message where more than 1 optionCode is sent, and I don't believe that it is actually supported by Amadeus.

It is the intention of my library to remove any unnecessary complexity that exists in the Amadeus Web Services, which is why I tend to implement the simplest possible set of options that actually works.

So, as far as I am concerned, one optionCode is all that will ever be used. If you can provide me a functional example of a PNR_AddMultiElements message with multiple optionCodes and why it requires multiple optionCodes, i'd be more than happy to implement a fix. But I don't think you'll find one.

Some more explanation:
The optionCode element determines what happens with the PNR (End Transact, End Transact & Retrieve, Ignore, Ignore & Retrieve, etc), so it really doesn't make sense to do both an End Transact and an Ignore at the same time, they would be mutually exclusive. This makes me think that only single optionCodes are actually supported on Amadeus side. But feel free to investigate for yourself!

@bimusiek
Copy link
Collaborator Author

Hi,
I understand your point and I was really suprised when they asked me to send 3 codes.

Here is what I am doing and why Amadeus asked me to change it.

  1. I do Air_SellFromRecommendation in stateful session
  2. Then I do AddMultiElements to add names, phone numbers etc with option code 11 (save and retrieve)

However from documentation about optionCodes
screen shot 2016-12-13 at 16 18 13
you can combine 11 with 30 + 267.

And from the user guide on webservices,

Names Elements
When creating a name item within this function the following information should be noted:
There is no special processing required for adding a name element. Therefore, the mandatory option code is set to 0.

you have to set 0 when calling PNR_AddMultiElements with phones, names etc.

Then you do empty call with these 3 codes: 11, 30, 267

So what they told me is that flow should look like:

  1. SellFromRecommendation
  2. AddMultiElements with all the passenger details (code: 0)
  3. AddMultiElements with 11, 30, 267 codes.

Does it explain it?

@DerMika
Copy link
Collaborator

DerMika commented Dec 13, 2016

Well, you learn something new every day. I had never encountered this situation before and didn't know that this possibility existed.

As far as I know, this scenario is not documented on the Web Services Extranet? Is it in some kind of implementation guide?

Ok, I'll develop a fix to support multiple option codes.

@DerMika DerMika added this to the 1.2.0 milestone Dec 13, 2016
@bimusiek
Copy link
Collaborator Author

It is in extranet, in both pdfs and in user guides.
Thank you very much! :)

DerMika added a commit that referenced this issue Dec 14, 2016
@DerMika
Copy link
Collaborator

DerMika commented Dec 14, 2016

I've added support for this in the master branch now, to be released with version 1.2.0.

See the docs for an example: https://github.com/amabnl/amadeus-ws-client/blob/master/docs/samples/pnr-create-modify.rst#multiple-action-codes-optioncode

If you have any problems with it, don't hesitate to open a new issue or reopen this one!

@DerMika DerMika closed this as completed Dec 14, 2016
@bimusiek
Copy link
Collaborator Author

Thanks, just tested and it works as expected :)
I am waiting for confirmation from Amadeus Dev team to confirm it is ok now.

@DerMika DerMika changed the title PnrAddMultiElementsBase actionCode Pnr_AddMultiElements support for multiple optionCodes Dec 16, 2016
atomy pushed a commit to mlamm/amadeus-ws-client that referenced this issue Nov 26, 2018
…AN-709 to master

* commit '8bdcdbe1663d47daa6413111a15cf2690d7448ed':
  VAN-709 Operating carrier optional
  VAN-709
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants