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

fareCheckRules #21

Closed
fayax opened this issue Sep 23, 2016 · 16 comments
Closed

fareCheckRules #21

fayax opened this issue Sep 23, 2016 · 16 comments

Comments

@fayax
Copy link

fayax commented Sep 23, 2016

I have a doubt on how to get fare components and to check fare rules for FC.
Would be great if you can give an example.

@DerMika
Copy link
Collaborator

DerMika commented Sep 23, 2016

Hi, If you are really talking about Fare Components, then you're talking about the cryptic entry FQQ, correct?

I do not have the structured equivalent of FQQimplemented in the library yet (this is the message Fare_DisplayTicketImage).

These (FQQand FQN- Fare_CheckRules) can all be called in the context of a previous pricing entry. So to get any information from these messages, the message before calling this message should be for example a Fare_PricePnrWithBookingClass message. A successful pricing result will get a number assigned to it, so you should call the follow-up messages like Fare_CheckRules by providing that number: https://github.com/amabnl/amadeus-ws-client/blob/master/docs/samples.rst#fare-checkrules.

Will you have a need for the Fare_DisplayTicketImage? If so, please open a separate issue requesting for its implementation!

@fayax
Copy link
Author

fayax commented Sep 23, 2016

I'm not sure if this is the cryptic entry. As per Aamdeus provided recommendation workflow to check fare rule, the steps are:

  1. Apply Fare_PricePNRwithBookingClass
  2. Apply Fare_CheckRules
  3. Apply Fare_CheckRules for each Fare Components (with FC reference from step 2).

I'm kind of confused with step 2 and 3.

@DerMika
Copy link
Collaborator

DerMika commented Sep 23, 2016

Ehm. Maybe they mean if your Fare_PricePNRWithBookingClass returns multiple pricings? This can happen when you have adults and children in the same PNR, they will likely get a different fare.

EDIT: No, that doesn't make sense with "(with FC reference from step 2)" either.

@DerMika
Copy link
Collaborator

DerMika commented Sep 23, 2016

One thing I can think of is that they tell you to first request which categories of Fare Rules are available for a given pricing, and then request the rules for those specific categories:

First, you do a Fare_CheckRules and request a list of rule categories by doing this:

$client->fareCheckRules(
    new FareCheckRulesOptions([
            'recommendations' => [1],
            'categoryList' => true
        ])
);

The response will be something like this:

<Fare_CheckRulesReply xmlns="http://xml.amadeus.com/FARQNR_07_1_1A">
    <transactionType>
        <messageFunctionDetails>
            <messageFunction>712</messageFunction>
        </messageFunctionDetails>
    </transactionType>
    <flightDetails>
        <nbOfSegments/>
        <qualificationFareDetails>
            <fareDetails>
                <qualifier>ADT</qualifier>
                <fareCategory>NIT</fareCategory>
            </fareDetails>
            <additionalFareDetails>
                <fareClass>MNR2MBE</fareClass>
            </additionalFareDetails>
        </qualificationFareDetails>
        <flightErrorCode>
            <freeTextQualification>
                <textSubjectQualifier>3</textSubjectQualifier>
                <informationType>PTC</informationType>
            </freeTextQualification>
            <freeText>ADULT</freeText>
        </flightErrorCode>
        <flightErrorCode>
            <freeTextQualification>
                <textSubjectQualifier>3</textSubjectQualifier>
                <informationType>FTC</informationType>
            </freeTextQualification>
            <freeText>NEGO IIT</freeText>
        </flightErrorCode>
        <productInfo>
            <productDetails>
                <bookingClassDetails>
                    <designator>M</designator>
                </bookingClassDetails>
            </productDetails>
        </productInfo>
        <travellerGrp>
            <travellerIdentRef>
                <referenceDetails>
                    <type>RU</type>
                    <value>00M0</value>
                </referenceDetails>
            </travellerIdentRef>
            <fareRulesDetails>
                <ruleSectionId>MX</ruleSectionId>
                <ruleSectionId>SE</ruleSectionId>
                <ruleSectionId>SR</ruleSectionId>
                <ruleSectionId>AP</ruleSectionId>
                <ruleSectionId>FL</ruleSectionId>
                <ruleSectionId>CD</ruleSectionId>
                <ruleSectionId>SO</ruleSectionId>
                <ruleSectionId>SU</ruleSectionId>
            </fareRulesDetails>
        </travellerGrp>
    </flightDetails>
</Fare_CheckRulesReply>

And then you can call Fare_CheckRules again and request the rules for the travellerGrp/fareRulesDetails/ruleSectionId nodes that were returned earlier:

$client->fareCheckRules(
    new FareCheckRulesOptions([
            'recommendations' => [1],
            'categories' => ['MX', 'SE', 'SR', 'AP', 'FL', 'CD', 'SO', 'SU']
        ])
);

Not sure if that is what they mean. If not: do you have an Amadeus support contact which is assigned to assist with your project?

@fayax
Copy link
Author

fayax commented Sep 23, 2016

Yes, that's what they are referring to.
It doesn't return the categories (MX, SE, AP, etc..) even if I set 'categoryList' => true.
If I put the categories one at a time it returns the rule for that category. But it doesn't return the rule if I put all the categories in an array as mentioned in your post.

@DerMika
Copy link
Collaborator

DerMika commented Sep 23, 2016

I will check if there's a bug. Hold on.

@DerMika
Copy link
Collaborator

DerMika commented Sep 29, 2016

Hi @fayax , I can't reproduce this issue. I'm generating the correct message here and I'm getting the correct response.

Maybe it's related to the specific fare you're trying to get info for, maybe it's a setting on the Amadeus Office you're working on. I suggest you contact your Amadeus support contact to help you figure out what's wrong.

@fayax
Copy link
Author

fayax commented Oct 2, 2016

@DerMika Thanks! How can I display the SOAP request?

@DerMika
Copy link
Collaborator

DerMika commented Oct 2, 2016

If you provide a logger on instantiation it will log each request & response to the logfile.

@fayax
Copy link
Author

fayax commented Oct 6, 2016

Thanks

@fayax fayax closed this as completed Oct 6, 2016
@fayax
Copy link
Author

fayax commented Oct 30, 2016

I have been discussing this with Amadeus support and they said since I'm getting only FC reference after generic fareCheckRules request, I should send a follow up query with that FC reference. Here is the sample follow up query from them:

<Fare_CheckRules>
  <msgType>
    <messageFunctionDetails>
      <messageFunction>712</messageFunction>
    </messageFunctionDetails>
  </msgType>
  <itemNumber>
    <itemNumberDetails>
      <number>1</number>
    </itemNumberDetails>
    <itemNumberDetails>
      <number>1</number>
      <type>FC</type>
    </itemNumberDetails>
  </itemNumber>
</Fare_CheckRules>

How do I send this kind of query?

@fayax fayax reopened this Oct 30, 2016
@DerMika
Copy link
Collaborator

DerMika commented Oct 30, 2016

This is not yet possible with the current library. I'll push a fix tonight or tomorrow.

@DerMika
Copy link
Collaborator

DerMika commented Oct 31, 2016

Ok, i've now added support for requesting rules for specific fare components of a pricing request.

For an example of how to do this, check the second example here: https://github.com/amabnl/amadeus-ws-client/blob/master/docs/samples.rst#fare-checkrules

Please let me know if that fixes your problem!

@DerMika
Copy link
Collaborator

DerMika commented Nov 9, 2016

Hey @fayax were you able to check if this fix solves your problem?

@fayax
Copy link
Author

fayax commented Nov 23, 2016

Hi, Sorry for the late response. That fix solves the problems. It is working fine now.
Thank you

@fayax fayax closed this as completed Nov 23, 2016
@DerMika
Copy link
Collaborator

DerMika commented Nov 23, 2016

Good to hear, thanks

@DerMika DerMika added this to the 1.2.0 milestone Nov 6, 2017
atomy pushed a commit to mlamm/amadeus-ws-client that referenced this issue Nov 26, 2018
…AN-524-search-compare-services-add-profiling to master

* commit 'e1ee8d7c994830e44e81083710fbb076960b1070':
  VAN-524 (fix) | move dependencies from require-dev to require
  VAN-524 search & compare services - add profiling script | (fix) disabled profiling by default
  VAN-524 search & compare services - add profiling script | (add) profiling via tideways and appropriate dependencies
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