KIU_AirPriceRQ/RS - Extensión Ancillaries
Objetivo:
Agregar los componentes necesarios en el método para que dado un PNR, pueda ejecutar una cotización o reprice del mismo incluyendo los servicios de ancillaries que compongan dicha reserva y devolviendo en formato lógico la información referente a itinerario aéreo y oferta de servicios reservados.
KIU_AirPriceRQ - by PNR - Lógica de Ancillaries:
El método KIU_AirPriceRQ by PNR es soportado por el stored procedure: res.dbo.WEB_XML_Fared.
Ejemplo del método:
<?xml version="1.0" encoding="UTF-8"?> <KIU_AirPriceRQ EchoToken="1" TimeStamp="2015-03-09T16:49:52+00:00" Target="Production" Version="3.0" SequenceNmbr="1" PrimaryLangID="en-us" Type="Reprice" IncludeAncillaries="true"> <POS> <Source AgentSine="AEP00XXSM" PseudoCityCode="AEP" ISOCountry="AR" ISOCurrency="ARS" TerminalID="AEP00XX817"> <RequestorID Type="5" /> <BookingChannel Type="1" /> </Source> </POS> <BookingReferenceID ID="SVRMLU" /> <TravelerInfoSummary></TravelerInfoSummary> </KIU_AirPriceRQ>
sobre este Stored, se agrego el calificador IncludeAncillaries, el mismo admite como valor :
1 - true
0 - false
Acciones sobre el request:
<KIU_AirPriceRQ EchoToken="1" TimeStamp="2015-03-09T16:49:52+00:00" Target="Production" Version="3.0" SequenceNmbr="1" PrimaryLangID="en-us" Type="Reprice" IncludeAncillaries="true">
A efectos de usuario, el atributo tiene que ser tipo Boolean (true\false): Si la variable es true se debe indicar en la llamada al stored con valor '1' caso contrario, si no esta declarado o esta declarado en 'false' se debe hacer la llamada al stored con el indicador en '0'.
Procesamiento del stored:
El stored procedure va a tomar el valor de IncludeAncillaries y va a ejecutar intrínsecamente el comando WS+AE y devolver la respuesta en formato JSON tal cuál lo hace la terminal.
KIU_AirPriceRS - Extensión Ancillaries -
Procesamiento de datos:
Como ya se mencionó, el stored va a devolver la estructura de precios del itinerario y su correspondientes componentes de Ancillaries en el formato específico del comando WW en JSON.
Ej:
{ "Data": { "Resultado": "OK", "Command": "WS+AE", "Quoted": { "AgenteID": "KIUHELPGN", "DateTime": "2017-08-28 13:08" }, "Quotations": { "Quotation1": { "QuoteMode": "Automatic", "PaxType": "A", "Quantity": "3", "QuotationType": "D", "FareConstruction": "BUE XX PTY 1000.00NUC1000.00END ROE1.000000", "Amounts": { "BaseFare": { "Currency": "USD", "Amount": "1000.00" }, "EquivalentPaid": { "Currency": "ARS", "Amount": "17400.00" }, "TotalAmount": { "Currency": "ARS", "Amount": "20190.96" }, "Taxes": { "AR": { "Amount": "1242.36" }, "QO": { "Amount": "174.00" }, "TQ": { "Amount": "174.00" }, "XR": { "Amount": "852.60" }, "YQ": { "Amount": "348.00" } } }, "Segments": { "1": { "MarketingCarrier": "XX", "OperatingCarrier": "", "FlightNumber": "453", "Origin": "EZE", "Destination": "PTY", "BookingCode": "B", "FlightDate": "080917", "ReservationStatus": "", "FareBasis": "BOW", "NotValidBefore": "", "NotValidAfter": "", "BagaggeAllow": { "Quantity": "23", "Unit": "" }, "FlightRemark": "" } } } }, "AncillariesQuotations": { "AncillariesQuoted": { "AgenteID": "KIUHELPGN", "DateTime": "2017-08-28 13:08" }, "AncillariesQuotation1": { "QuoteMode": "Automatic", "EMD_Type": "A", "PTC": "ADT", "PaxQuantity": "1", "PassengerUPID": "1", "FareConstruction": "", "Amounts": { "BaseFare": { "Currency": "USD", "Amount": "100.00" }, "EquivalentPaid": { "Currency": "ARS", "Amount": "1740.00" }, "TotalAmount": { "Currency": "ARS", "Amount": "1740.00" } }, "Coupons": { "1": { "RFIC": "A", "RFISC": "0B5", "RFISC_Description": "SEAT ASSIGNMENT", "FareCurrency": "USD", "FareAmount": "100.00", "Remark": "", "PresentAt_CityOfService": "EZE", "PresentAt_CityOfServiceName": "EZEIZA", "PresentTo_AirlineOfService": "XX", "PresentTo_AirlineOfServiceName": "LINEAS AEREAS XX", "ServiceID": "LINEAS AER", "ServiceItemType": "SEA", "ServiceQuantity": "1", "Exchangeable": "false", "Refundable": "true", "ConsumedAtIssuance": "false", "RequireTicketAssociated": "true", "FeeOwnerAirlineDesignator": "XX", "ServiceCode": "SEAT", "ServiceAditionalInfo": { "MarketingCarrier": "XX", "OperatingCarrier": "", "FlightNumber": "453", "DateOfService": "080917", "BookingCode": "B", "CityOfService": "EZE", "CityToOfService": "PTY", "Bagagge": { "ExcessBaggageTotalNumber": "0", "ExcessBaggageUnitOfMeasure": "K", "ExcessBaggageCurrency": "", "ExcessBaggageRatePerUnit": "0.00" }, "SegmentUPID": "1" } } } }, "AncillariesQuotation2": { "QuoteMode": "Automatic", "EMD_Type": "A", "PTC": "ADT", "PaxQuantity": "1", "PassengerUPID": "1", "FareConstruction": "", "Amounts": { "BaseFare": { "Currency": "USD", "Amount": "0.00" }, "EquivalentPaid": { "Currency": "ARS", "Amount": "0.00" }, "TotalAmount": { "Currency": "ARS", "Amount": "0.00" } }, "Coupons": { "1": { "RFIC": "C", "RFISC": "0CC", "RFISC_Description": "1ST ADDITIONAL BAG", "FareCurrency": "USD", "FareAmount": "0.00", "Remark": "", "PresentAt_CityOfService": "EZE", "PresentAt_CityOfServiceName": "EZEIZA", "PresentTo_AirlineOfService": "XX", "PresentTo_AirlineOfServiceName": "LINEAS AEREAS XX", "ServiceID": "LINEAS AER", "ServiceItemType": "SSR", "ServiceQuantity": "1", "Exchangeable": "false", "Refundable": "false", "ConsumedAtIssuance": "false", "RequireTicketAssociated": "true", "FeeOwnerAirlineDesignator": "XX", "ServiceCode": "PBGF", "ServiceAditionalInfo": { "MarketingCarrier": "XX", "OperatingCarrier": "", "FlightNumber": "453", "DateOfService": "080917", "BookingCode": "B", "CityOfService": "EZE", "CityToOfService": "PTY", "Bagagge": { "ExcessBaggageTotalNumber": "0", "ExcessBaggageUnitOfMeasure": "K", "ExcessBaggageCurrency": "", "ExcessBaggageRatePerUnit": "0.00" }, "SegmentUPID": "1" } } } }, "AncillariesQuotation3": { "QuoteMode": "Automatic", "EMD_Type": "A", "PTC": "ADT", "PaxQuantity": "1", "PassengerUPID": "1", "FareConstruction": "", "Amounts": { "BaseFare": { "Currency": "USD", "Amount": "0.00" }, "EquivalentPaid": { "Currency": "ARS", "Amount": "0.00" }, "TotalAmount": { "Currency": "ARS", "Amount": "0.00" } }, "Coupons": { "1": { "RFIC": "G", "RFISC": "0B1", "RFISC_Description": "IN FLIGHT ENTERTAINMENT", "FareCurrency": "USD", "FareAmount": "0.00", "Remark": "", "PresentAt_CityOfService": "EZE", "PresentAt_CityOfServiceName": "EZEIZA", "PresentTo_AirlineOfService": "XX", "PresentTo_AirlineOfServiceName": "LINEAS AEREAS XX", "ServiceID": "LINEAS AER", "ServiceItemType": "SSR", "ServiceQuantity": "1", "Exchangeable": "false", "Refundable": "true", "ConsumedAtIssuance": "false", "RequireTicketAssociated": "false", "FeeOwnerAirlineDesignator": "XX", "ServiceCode": "PDIE", "ServiceAditionalInfo": { "MarketingCarrier": "XX", "OperatingCarrier": "", "FlightNumber": "453", "DateOfService": "080917", "BookingCode": "B", "CityOfService": "EZE", "CityToOfService": "PTY", "Bagagge": { "ExcessBaggageTotalNumber": "0", "ExcessBaggageUnitOfMeasure": "K", "ExcessBaggageCurrency": "", "ExcessBaggageRatePerUnit": "0.00" }, "SegmentUPID": "1" } } } }, "AncillariesQuotation4": { "QuoteMode": "Automatic", "EMD_Type": "A", "PTC": "ADT", "PaxQuantity": "1", "PassengerUPID": "2", "FareConstruction": "", "Amounts": { "BaseFare": { "Currency": "USD", "Amount": "100.00" }, "EquivalentPaid": { "Currency": "ARS", "Amount": "1740.00" }, "TotalAmount": { "Currency": "ARS", "Amount": "1740.00" } }, "Coupons": { "1": { "RFIC": "A", "RFISC": "0B5", "RFISC_Description": "SEAT ASSIGNMENT", "FareCurrency": "USD", "FareAmount": "100.00", "Remark": "", "PresentAt_CityOfService": "EZE", "PresentAt_CityOfServiceName": "EZEIZA", "PresentTo_AirlineOfService": "XX", "PresentTo_AirlineOfServiceName": "LINEAS AEREAS XX", "ServiceID": "LINEAS AER", "ServiceItemType": "SEA", "ServiceQuantity": "1", "Exchangeable": "false", "Refundable": "true", "ConsumedAtIssuance": "false", "RequireTicketAssociated": "true", "FeeOwnerAirlineDesignator": "XX", "ServiceCode": "SEAT", "ServiceAditionalInfo": { "MarketingCarrier": "XX", "OperatingCarrier": "", "FlightNumber": "453", "DateOfService": "080917", "BookingCode": "B", "CityOfService": "EZE", "CityToOfService": "PTY", "Bagagge": { "ExcessBaggageTotalNumber": "0", "ExcessBaggageUnitOfMeasure": "K", "ExcessBaggageCurrency": "", "ExcessBaggageRatePerUnit": "0.00" }, "SegmentUPID": "1" } } } }, "AncillariesQuotation5": { "QuoteMode": "Automatic", "EMD_Type": "A", "PTC": "ADT", "PaxQuantity": "1", "PassengerUPID": "2", "FareConstruction": "", "Amounts": { "BaseFare": { "Currency": "USD", "Amount": "0.00" }, "EquivalentPaid": { "Currency": "ARS", "Amount": "0.00" }, "TotalAmount": { "Currency": "ARS", "Amount": "0.00" } }, "Coupons": { "1": { "RFIC": "G", "RFISC": "0B1", "RFISC_Description": "IN FLIGHT ENTERTAINMENT", "FareCurrency": "USD", "FareAmount": "0.00", "Remark": "", "PresentAt_CityOfService": "EZE", "PresentAt_CityOfServiceName": "EZEIZA", "PresentTo_AirlineOfService": "XX", "PresentTo_AirlineOfServiceName": "LINEAS AEREAS XX", "ServiceID": "LINEAS AER", "ServiceItemType": "SSR", "ServiceQuantity": "1", "Exchangeable": "false", "Refundable": "true", "ConsumedAtIssuance": "false", "RequireTicketAssociated": "false", "FeeOwnerAirlineDesignator": "XX", "ServiceCode": "PDIE", "ServiceAditionalInfo": { "MarketingCarrier": "XX", "OperatingCarrier": "", "FlightNumber": "453", "DateOfService": "080917", "BookingCode": "B", "CityOfService": "EZE", "CityToOfService": "PTY", "Bagagge": { "ExcessBaggageTotalNumber": "0", "ExcessBaggageUnitOfMeasure": "K", "ExcessBaggageCurrency": "", "ExcessBaggageRatePerUnit": "0.00" }, "SegmentUPID": "1" } } } }, "AncillariesQuotation6": { "QuoteMode": "Automatic", "EMD_Type": "A", "PTC": "ADT", "PaxQuantity": "1", "PassengerUPID": "3", "FareConstruction": "", "Amounts": { "BaseFare": { "Currency": "USD", "Amount": "100.00" }, "EquivalentPaid": { "Currency": "ARS", "Amount": "1740.00" }, "TotalAmount": { "Currency": "ARS", "Amount": "1740.00" } }, "Coupons": { "1": { "RFIC": "A", "RFISC": "0B5", "RFISC_Description": "SEAT ASSIGNMENT", "FareCurrency": "USD", "FareAmount": "100.00", "Remark": "", "PresentAt_CityOfService": "EZE", "PresentAt_CityOfServiceName": "EZEIZA", "PresentTo_AirlineOfService": "XX", "PresentTo_AirlineOfServiceName": "LINEAS AEREAS XX", "ServiceID": "LINEAS AER", "ServiceItemType": "SEA", "ServiceQuantity": "1", "Exchangeable": "false", "Refundable": "true", "ConsumedAtIssuance": "false", "RequireTicketAssociated": "true", "FeeOwnerAirlineDesignator": "XX", "ServiceCode": "SEAT", "ServiceAditionalInfo": { "MarketingCarrier": "XX", "OperatingCarrier": "", "FlightNumber": "453", "DateOfService": "080917", "BookingCode": "B", "CityOfService": "EZE", "CityToOfService": "PTY", "Bagagge": { "ExcessBaggageTotalNumber": "0", "ExcessBaggageUnitOfMeasure": "K", "ExcessBaggageCurrency": "", "ExcessBaggageRatePerUnit": "0.00" }, "SegmentUPID": "1" } } } }, "AncillariesQuotation7": { "QuoteMode": "Automatic", "EMD_Type": "A", "PTC": "ADT", "PaxQuantity": "1", "PassengerUPID": "3", "FareConstruction": "", "Amounts": { "BaseFare": { "Currency": "USD", "Amount": "0.00" }, "EquivalentPaid": { "Currency": "ARS", "Amount": "0.00" }, "TotalAmount": { "Currency": "ARS", "Amount": "0.00" } }, "Coupons": { "1": { "RFIC": "G", "RFISC": "0B1", "RFISC_Description": "IN FLIGHT ENTERTAINMENT", "FareCurrency": "USD", "FareAmount": "0.00", "Remark": "", "PresentAt_CityOfService": "EZE", "PresentAt_CityOfServiceName": "EZEIZA", "PresentTo_AirlineOfService": "XX", "PresentTo_AirlineOfServiceName": "LINEAS AEREAS XX", "ServiceID": "LINEAS AER", "ServiceItemType": "SSR", "ServiceQuantity": "1", "Exchangeable": "false", "Refundable": "true", "ConsumedAtIssuance": "false", "RequireTicketAssociated": "false", "FeeOwnerAirlineDesignator": "XX", "ServiceCode": "PDIE", "ServiceAditionalInfo": { "MarketingCarrier": "XX", "OperatingCarrier": "", "FlightNumber": "453", "DateOfService": "080917", "BookingCode": "B", "CityOfService": "EZE", "CityToOfService": "PTY", "Bagagge": { "ExcessBaggageTotalNumber": "0", "ExcessBaggageUnitOfMeasure": "K", "ExcessBaggageCurrency": "", "ExcessBaggageRatePerUnit": "0.00" }, "SegmentUPID": "1" } } } } } } }
Actualmente, esta estructura se debe manejar como fuente de datos para la confección del método KIU_AirBookV2RS
Tiene el procesamiento de datos de precio del itinerario aéreo que hace el match al elemento PricingInfo y el procesamiento de los precios de ancillaries (AncillariesQuotation) para mostrar el Elemento Offer.
Sobre esta estructura se debe armar el siguiente XML de respuesta de KIU_AirPriceRS cuando el atributo IncludeAncillaries tenga valor 'true':
Match de datos al método XML:
<?xml version="1.0" encoding="UTF-8"?> <KIU_AirPriceRS EchoToken="1" TimeStamp="2017-08-28T16:52:10+00:00" Target="Testing" Version="3.0" SequenceNmbr="1"> <Success/> <!-- Warnings: Advertencia o lista de advertencias que provengan del stored --> <Warnings> <Warning Type="13">PRICE DISCREPANCIES</Warning> </Warnings> <!-- PricedItienraries: Precio de los itinerarios. --> <PricedItineraries> <PricedItinerary SequenceNumber="1"> <!-- Precio de componentes de reserva. --> <AirItineraryPricingInfo> <!-- ItinTotalFare: Componente Aéreo Totales --> <ItinTotalFare> <BaseFare Amount="52200" CurrencyCode="ARS"/> <Taxes> <Tax TaxCode="AR" Amount="3654" CurrencyCode="ARS"/> <Tax TaxCode="QO" Amount="522" CurrencyCode="ARS"/> <Tax TaxCode="TQ" Amount="522" CurrencyCode="ARS"/> <Tax TaxCode="XR" Amount="2557.8" CurrencyCode="ARS"/> </Taxes> <TotalFare Amount="59455.8" CurrencyCode="ARS"/> </ItinTotalFare> <PTC_FareBreakdowns> <!-- PTC_BreakDown: Detalle de precio por TIPO de PASAJERO --> <PTC_FareBreakdown> <PassengerTypeQuantity Quantity="3" Code="ADT" /> <PassengerFare> <BaseFare Amount="52200" CurrencyCode="ARS"/> <Taxes> <Tax TaxCode="AR" Amount="3654" CurrencyCode="ARS" /> <Tax TaxCode="QO" Amount="522" CurrencyCode="ARS" /> <Tax TaxCode="TQ" Amount="522" CurrencyCode="ARS" /> <Tax TaxCode="XR" Amount="2557.8" CurrencyCode="ARS" /> </Taxes> </PassengerFare> </PTC_FareBreakdown> </PTC_FareBreakdowns> <!-- TPA_Extension: Agregado que muestra el total de Ancillaries cotizados que existen en la reserva --> <TPA_Extension> <Offer> <!-- Priced: Lista de items asociados x segmento donde se describe que servicios de cada grupo estan reservados --> <Priced SegmentRPH="[SegementUPID:]"> <!-- ServiceFamily: Repetitivo por cada "AncillariesQuotation" que exista en la respuesta JSON --> <ServiceFamily Group="[RFIC:]" Type="[EMDType:]" PTC="[PTC:]" Quantity="1"> <!-- Coupon1 Item asociado x cada pasajero.--> <ItemOffer Code="[RFISC:]" Description="[RFISC_Description:]" TravelerRefRRPH="[PassengerUPID:]"> <!-- IssueInfo: Condiciones de emisión de cada cupon --> <IssueInfo> <Exchangeble>["Exchangeable":]</Exchangeble> <Refundable>["Refundable":]</Refundable> <ConsumeAtIssuance>["ConsumedAtIssuance":]</ConsumeAtIssuance> <RequiredTicket>["RequireTicketAssociated":]</RequiredTicket> </IssueInfo> <ItemPriced> <!-- Amount: Detalle del precio de cada servicio --> <Amount> <!-- JSON "Amounts": --> <!-- "BaseFare": { "Currency": "USD", "Amount": "0.00" }, --> <BaseFare CurrencyCode="USD">200.00</BaseFare> <!-- "EquivalentPaid": { "Currency": "ARS", "Amount": "0.00" }, --> <EquivalentPaid CurrencyCode="ARS">1745.00</EquivalentPaid> <!-- "TotalAmount": { "Currency": "ARS", "Amount": "0.00" } --> <TotalPriced CurrencyCode=""/> </Amount> <!-- Taxes: Es opcional. Si no hay info no se muestra - --> <!-- "Taxes": { TaxCode=> "AA": { TaxAmount=> "Amount": "125.54" }, "BB": { "Amount": "5.00" } }, --> <Taxes> <Tax> <TaxCode>QN</TaxCode> <TaxAmount>10.00</TaxAmount> </Tax> </Taxes> <!-- Se aplica unicamente a aquellos códigos asociados a ExcessBagagge, FamilyService code="C" RFIC = "C" --> <TPA_Extension> <BaggageInfo UnitOfMeasure="[BaggageUnitOfMeasure:]" CurrencyCode="[ExcessBaggageCurrency:]" RatePerUnit="[ExcessBaggageRatePerUnit:]"> <ExcessBaggageTotalNbr>["ExcessBaggageTotalNumber"]</ExcessBaggageTotalNbr> </BaggageInfo> </TPA_Extension> </ItemPriced> </ItemOffer> <!-- Coupon2 --> <ItemOffer Code="[RFISC]" Description="[RFISC_Description]" SegmentRPH="[segmentUpid]"> <ItemPriced TravelerRefRRPH="1"> <Amount> <BaseFare CurrencyCode="USD">200.00</BaseFare> <EquivalentPaid CurrencyCode="ARS">1745.00</EquivalentPaid> <TotalPriced CurrencyCode=""/> </Amount> <!-- Taxes: Es opcional. Si no hay info no se muestra - TBD en JSON --> <Taxes> <Tax> <TaxCode>QN</TaxCode> <TaxAmount>10.00</TaxAmount> </Tax> </Taxes> </ItemPriced> </ItemOffer> </ServiceFamily> </Priced> </Offer> </TPA_Extension> </AirItineraryPricingInfo> </PricedItinerary> </PricedItineraries> <IssueOfficeInfo OfficeID=""/> </KIU_AirPriceRS>
Para lo cuál las funciones que usa KIU_AirBookV2RS se pueden re-utilizar en esta extensión.