Мастер-Web:Дополнительный модуль Сервис TourML Приложение С — различия между версиями

Материал из Megatec
Перейти к: навигация, поиск
[досмотренная версия][досмотренная версия]
(Введение)
 
(не показано 6 промежуточных версий 2 участников)
Строка 1: Строка 1:
 
<span style="color:red;font-size:120%">Статья находится на стадии разработки.</span><br>
 
<span style="color:red;font-size:120%">Статья находится на стадии разработки.</span><br>
 
Версия статьи от {{REVISIONDAY}}-{{REVISIONMONTH}}-{{REVISIONYEAR}}.
 
Версия статьи от {{REVISIONDAY}}-{{REVISIONMONTH}}-{{REVISIONYEAR}}.
11. Приложение С. Функции работы с путевкой
+
==Введение==
 
+
Эта статья является приложением C к статье [[Web-сервисы: Сервис TourML|Дополнительный модуль Сервис TourML]]. В ней рассказывается о функциях работы с путевкой в веб-сервисе TourML.
11.1. Функция GetAgreementsByNumber
 
 
 
После того, как путевка забронирована, информацию о статусе путевке и отдельных услуг можно получить по ключу путевки. Ответ функция GetAgreementsByNumber возвращает XML-документ, аналогичный документу, возвращаемому функцией CreateBooking.
 
  
 +
==Функция GetAgreementsByNumber==
 +
После того, как путевка забронирована, информацию о статусе путевке и отдельных услуг можно получить по ключу путевки. Функция GetAgreementsByNumber возвращает XML-документ, аналогичный документу, возвращаемому функцией CreateBooking.
 +
<TABLE STYLE="border: 0.1em dashed #2F6FAB; margin: 8px; padding: 8px" WIDTH="100%"><TR><TD>
 +
<syntaxhighlight lang="xml" enclose="div">
 
   <?xml version="1.0" ?>  
 
   <?xml version="1.0" ?>  
- <agreements xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" date="0001-01-01" time="00:00:00.0000000+04:00">
+
<agreements xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" date="0001-01-01" time="00:00:00.0000000+04:00">
- <agreement xmlns="http://tourml.ru/bookings/2004-09-28">
+
<agreement xmlns="http://tourml.ru/bookings/2004-09-28">
- <header uri="" checkin="2009-09-04" buyerPerson="0" mainPerson="92470" agreementKey="43037" agreementCode="TR 0904001" country="Турция" city="АНТАЛИЯ" days="8" quantity="2" price="69939.01" pricePaid="0" currency="рб" creationDate="2009-08-04" payUntil="2009-08-05" status="ok" errorStatus="unknown" commission="699.39">
+
<header uri="" checkin="2009-09-04" buyerPerson="0" mainPerson="92470" agreementKey="43037" agreementCode="TR 0904001" country="Турция" city="АНТАЛИЯ" days="8" quantity="2" price="69939.01" pricePaid="0" currency="рб" creationDate="2009-08-04" payUntil="2009-08-05" status="ok" errorStatus="unknown" commission="699.39">
 
   <comment />  
 
   <comment />  
 
   </header>
 
   </header>
- <packets>
+
<packets>
- <packet id="_1">
+
<packet id="_1">
- <services>
+
<services>
- <hotelServices>
+
<hotelServices>
 
   <hotelService key="220699" name="HOTEL::АНТАЛИЯ/_NO_CENDER-4*,7 ночей/Double(Standart),Взр./AI Всё включено/" dayBeg="1" nights="7" days="7" men="2" reasonRus="Ok" reasonLat="Ok" serviceCategory="required" chosen="false" placeStatus="byRequest" serviceStatus="waitlist" sourceKey="0" buildingKey="1037" roomKey="1113" mealKey="38" infantsOnExtraBedCount="0" infantsOnMainBedCount="0" maxInfantsCount="0" maxInfantsOnMainBedCount="0" />  
 
   <hotelService key="220699" name="HOTEL::АНТАЛИЯ/_NO_CENDER-4*,7 ночей/Double(Standart),Взр./AI Всё включено/" dayBeg="1" nights="7" days="7" men="2" reasonRus="Ok" reasonLat="Ok" serviceCategory="required" chosen="false" placeStatus="byRequest" serviceStatus="waitlist" sourceKey="0" buildingKey="1037" roomKey="1113" mealKey="38" infantsOnExtraBedCount="0" infantsOnMainBedCount="0" maxInfantsCount="0" maxInfantsOnMainBedCount="0" />  
 
   </hotelServices>
 
   </hotelServices>
- <flightServices>
+
<flightServices>
 
   <flightService key="220698" name="А_П::Москва/АНТАЛИЯ/P76523, SVO2-AYT, 18:40-20:20/Y Экономический класс/" dayBeg="1" nights="0" days="0" men="2" reasonRus="Ok" reasonLat="Ok" serviceCategory="required" chosen="false" placeStatus="byRequest" serviceStatus="waitlist" sourceKey="0" flightKey="552" tariffKey="89" infantsOnIndividualPlaceCount="0" infantsWithoutPlaceCount="0" maxInfantsCount="0" maxInfantsOnIndividualPlaceCount="0" />  
 
   <flightService key="220698" name="А_П::Москва/АНТАЛИЯ/P76523, SVO2-AYT, 18:40-20:20/Y Экономический класс/" dayBeg="1" nights="0" days="0" men="2" reasonRus="Ok" reasonLat="Ok" serviceCategory="required" chosen="false" placeStatus="byRequest" serviceStatus="waitlist" sourceKey="0" flightKey="552" tariffKey="89" infantsOnIndividualPlaceCount="0" infantsWithoutPlaceCount="0" maxInfantsCount="0" maxInfantsOnIndividualPlaceCount="0" />  
 
   <flightService key="220697" name="А_П::АНТАЛИЯ/Москва/P76524, AYT-SVO2, 10:15-13:20/Y Экономический класс/" dayBeg="8" nights="0" days="0" men="2" reasonRus="Ok" reasonLat="Ok" serviceCategory="required" chosen="false" placeStatus="byRequest" serviceStatus="waitlist" sourceKey="0" flightKey="553" tariffKey="89" infantsOnIndividualPlaceCount="0" infantsWithoutPlaceCount="0" maxInfantsCount="0" maxInfantsOnIndividualPlaceCount="0" />  
 
   <flightService key="220697" name="А_П::АНТАЛИЯ/Москва/P76524, AYT-SVO2, 10:15-13:20/Y Экономический класс/" dayBeg="8" nights="0" days="0" men="2" reasonRus="Ok" reasonLat="Ok" serviceCategory="required" chosen="false" placeStatus="byRequest" serviceStatus="waitlist" sourceKey="0" flightKey="553" tariffKey="89" infantsOnIndividualPlaceCount="0" infantsWithoutPlaceCount="0" maxInfantsCount="0" maxInfantsOnIndividualPlaceCount="0" />  
 
   </flightServices>
 
   </flightServices>
 
   <excursionServices />  
 
   <excursionServices />  
- <transferServices>
+
<transferServices>
 
   <transferService key="220702" name="Трансфер::.БЕЛЕК/Отель (Белек) - Аэропорт, , /автобус /" dayBeg="8" nights="0" days="0" men="2" reasonRus="Ok" reasonLat="Ok" serviceCategory="required" chosen="false" placeStatus="byRequest" serviceStatus="waitlist" sourceKey="0" transferKey="385" transportKey="3" />  
 
   <transferService key="220702" name="Трансфер::.БЕЛЕК/Отель (Белек) - Аэропорт, , /автобус /" dayBeg="8" nights="0" days="0" men="2" reasonRus="Ok" reasonLat="Ok" serviceCategory="required" chosen="false" placeStatus="byRequest" serviceStatus="waitlist" sourceKey="0" transferKey="385" transportKey="3" />  
 
   <transferService key="220701" name="Трансфер::АНТАЛИЯ/Аэропорт-Отель (Белек), , /автобус /" dayBeg="1" nights="0" days="0" men="2" reasonRus="Ok" reasonLat="Ok" serviceCategory="required" chosen="false" placeStatus="byRequest" serviceStatus="waitlist" sourceKey="0" transferKey="383" transportKey="3" />  
 
   <transferService key="220701" name="Трансфер::АНТАЛИЯ/Аэропорт-Отель (Белек), , /автобус /" dayBeg="1" nights="0" days="0" men="2" reasonRus="Ok" reasonLat="Ok" serviceCategory="required" chosen="false" placeStatus="byRequest" serviceStatus="waitlist" sourceKey="0" transferKey="383" transportKey="3" />  
 
   </transferServices>
 
   </transferServices>
 
   <cruiseServices />  
 
   <cruiseServices />  
- <extraServices>
+
<extraServices>
 
   <extraService key="220700" name="Страховка::Турция/Мед. страховка - 15000$,8 дней/-/" dayBeg="1" nights="7" days="8" men="2" reasonRus="Ok" reasonLat="Ok" serviceCategory="required" chosen="false" placeStatus="byRequest" serviceStatus="waitlist" sourceKey="0" classKey="6" subKey="161" subKey1="18" subKey2="0" countryKey="86" cityKey="187" extraServiceType="custom" />  
 
   <extraService key="220700" name="Страховка::Турция/Мед. страховка - 15000$,8 дней/-/" dayBeg="1" nights="7" days="8" men="2" reasonRus="Ok" reasonLat="Ok" serviceCategory="required" chosen="false" placeStatus="byRequest" serviceStatus="waitlist" sourceKey="0" classKey="6" subKey="161" subKey1="18" subKey2="0" countryKey="86" cityKey="187" extraServiceType="custom" />  
 
   </extraServices>
 
   </extraServices>
Строка 35: Строка 36:
 
   </packet>
 
   </packet>
 
   </packets>
 
   </packets>
- <persons>
+
<persons>
- <person key="92471" sourceKey="92471" packets="_1" services="" firstNameRus="TEST" lastNameRus="TEST" firstNameLat="TEST" lastNameLat="TEST" sex="male" birthday="1982-02-02" nationalityRus="" nationalityLat="" isTourist="true">
+
<person key="92471" sourceKey="92471" packets="_1" services="" firstNameRus="TEST" lastNameRus="TEST" firstNameLat="TEST" lastNameLat="TEST" sex="male" birthday="1982-02-02" nationalityRus="" nationalityLat="" isTourist="true">
- <contacts>
+
<contacts>
- <phones>
+
<phones>
 
   <phone />  
 
   <phone />  
 
   </phones>
 
   </phones>
- <addresses>
+
<addresses>
 
   <address postalIndex="" city="" street="" building="" flat="" />  
 
   <address postalIndex="" city="" street="" building="" flat="" />  
 
   </addresses>
 
   </addresses>
 
   </contacts>
 
   </contacts>
- <passports>
+
<passports>
 
   <passport type="foreign" series="1111" number="111111111" emittedBy="ОВД" emittedWhen="1990-01-01" validTo="2007-02-02" />  
 
   <passport type="foreign" series="1111" number="111111111" emittedBy="ОВД" emittedWhen="1990-01-01" validTo="2007-02-02" />  
 
   <passport type="national" number="" emittedBy="" emittedWhen="0001-01-01" validTo="0001-01-01" />  
 
   <passport type="national" number="" emittedBy="" emittedWhen="0001-01-01" validTo="0001-01-01" />  
 
   </passports>
 
   </passports>
 
   </person>
 
   </person>
- <person key="92470" sourceKey="92470" packets="_1" services="" firstNameRus="TEST" lastNameRus="TEST" firstNameLat="TEST" lastNameLat="TEST" sex="male" birthday="1982-03-03" nationalityRus="" nationalityLat="" isTourist="true">
+
<person key="92470" sourceKey="92470" packets="_1" services="" firstNameRus="TEST" lastNameRus="TEST" firstNameLat="TEST" lastNameLat="TEST" sex="male" birthday="1982-03-03" nationalityRus="" nationalityLat="" isTourist="true">
- <contacts>
+
<contacts>
- <phones>
+
<phones>
 
   <phone />  
 
   <phone />  
 
   </phones>
 
   </phones>
- <addresses>
+
<addresses>
 
   <address postalIndex="" city="" street="" building="" flat="" />  
 
   <address postalIndex="" city="" street="" building="" flat="" />  
 
   </addresses>
 
   </addresses>
 
   </contacts>
 
   </contacts>
- <passports>
+
<passports>
 
   <passport type="foreign" series="1111" number="111111111" emittedBy="ОВД" emittedWhen="1990-01-01" validTo="2007-03-03" />  
 
   <passport type="foreign" series="1111" number="111111111" emittedBy="ОВД" emittedWhen="1990-01-01" validTo="2007-03-03" />  
 
   <passport type="national" number="" emittedBy="" emittedWhen="0001-01-01" validTo="0001-01-01" />  
 
   <passport type="national" number="" emittedBy="" emittedWhen="0001-01-01" validTo="0001-01-01" />  
Строка 67: Строка 68:
 
   </agreement>
 
   </agreement>
 
   </agreements>
 
   </agreements>
 +
</syntaxhighlight>
 +
</TD></TR></TABLE>

Текущая версия на 09:53, 21 июля 2016

Статья находится на стадии разработки.
Версия статьи от 21-07-2016.

Введение

Эта статья является приложением C к статье Дополнительный модуль Сервис TourML. В ней рассказывается о функциях работы с путевкой в веб-сервисе TourML.

Функция GetAgreementsByNumber

После того, как путевка забронирована, информацию о статусе путевке и отдельных услуг можно получить по ключу путевки. Функция GetAgreementsByNumber возвращает XML-документ, аналогичный документу, возвращаемому функцией CreateBooking.

  <?xml version="1.0" ?> 
 <agreements xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" date="0001-01-01" time="00:00:00.0000000+04:00">
 <agreement xmlns="http://tourml.ru/bookings/2004-09-28">
 <header uri="" checkin="2009-09-04" buyerPerson="0" mainPerson="92470" agreementKey="43037" agreementCode="TR 0904001" country="Турция" city="АНТАЛИЯ" days="8" quantity="2" price="69939.01" pricePaid="0" currency="рб" creationDate="2009-08-04" payUntil="2009-08-05" status="ok" errorStatus="unknown" commission="699.39">
  <comment /> 
  </header>
 <packets>
 <packet id="_1">
 <services>
 <hotelServices>
  <hotelService key="220699" name="HOTEL::АНТАЛИЯ/_NO_CENDER-4*,7 ночей/Double(Standart),Взр./AI Всё включено/" dayBeg="1" nights="7" days="7" men="2" reasonRus="Ok" reasonLat="Ok" serviceCategory="required" chosen="false" placeStatus="byRequest" serviceStatus="waitlist" sourceKey="0" buildingKey="1037" roomKey="1113" mealKey="38" infantsOnExtraBedCount="0" infantsOnMainBedCount="0" maxInfantsCount="0" maxInfantsOnMainBedCount="0" /> 
  </hotelServices>
 <flightServices>
  <flightService key="220698" name="А_П::Москва/АНТАЛИЯ/P76523, SVO2-AYT, 18:40-20:20/Y Экономический класс/" dayBeg="1" nights="0" days="0" men="2" reasonRus="Ok" reasonLat="Ok" serviceCategory="required" chosen="false" placeStatus="byRequest" serviceStatus="waitlist" sourceKey="0" flightKey="552" tariffKey="89" infantsOnIndividualPlaceCount="0" infantsWithoutPlaceCount="0" maxInfantsCount="0" maxInfantsOnIndividualPlaceCount="0" /> 
  <flightService key="220697" name="А_П::АНТАЛИЯ/Москва/P76524, AYT-SVO2, 10:15-13:20/Y Экономический класс/" dayBeg="8" nights="0" days="0" men="2" reasonRus="Ok" reasonLat="Ok" serviceCategory="required" chosen="false" placeStatus="byRequest" serviceStatus="waitlist" sourceKey="0" flightKey="553" tariffKey="89" infantsOnIndividualPlaceCount="0" infantsWithoutPlaceCount="0" maxInfantsCount="0" maxInfantsOnIndividualPlaceCount="0" /> 
  </flightServices>
  <excursionServices /> 
 <transferServices>
  <transferService key="220702" name="Трансфер::.БЕЛЕК/Отель (Белек) - Аэропорт, , /автобус /" dayBeg="8" nights="0" days="0" men="2" reasonRus="Ok" reasonLat="Ok" serviceCategory="required" chosen="false" placeStatus="byRequest" serviceStatus="waitlist" sourceKey="0" transferKey="385" transportKey="3" /> 
  <transferService key="220701" name="Трансфер::АНТАЛИЯ/Аэропорт-Отель (Белек), , /автобус /" dayBeg="1" nights="0" days="0" men="2" reasonRus="Ok" reasonLat="Ok" serviceCategory="required" chosen="false" placeStatus="byRequest" serviceStatus="waitlist" sourceKey="0" transferKey="383" transportKey="3" /> 
  </transferServices>
  <cruiseServices /> 
 <extraServices>
  <extraService key="220700" name="Страховка::Турция/Мед. страховка - 15000$,8 дней/-/" dayBeg="1" nights="7" days="8" men="2" reasonRus="Ok" reasonLat="Ok" serviceCategory="required" chosen="false" placeStatus="byRequest" serviceStatus="waitlist" sourceKey="0" classKey="6" subKey="161" subKey1="18" subKey2="0" countryKey="86" cityKey="187" extraServiceType="custom" /> 
  </extraServices>
  </services>
  </packet>
  </packets>
 <persons>
 <person key="92471" sourceKey="92471" packets="_1" services="" firstNameRus="TEST" lastNameRus="TEST" firstNameLat="TEST" lastNameLat="TEST" sex="male" birthday="1982-02-02" nationalityRus="" nationalityLat="" isTourist="true">
 <contacts>
 <phones>
  <phone /> 
  </phones>
 <addresses>
  <address postalIndex="" city="" street="" building="" flat="" /> 
  </addresses>
  </contacts>
 <passports>
  <passport type="foreign" series="1111" number="111111111" emittedBy="ОВД" emittedWhen="1990-01-01" validTo="2007-02-02" /> 
  <passport type="national" number="" emittedBy="" emittedWhen="0001-01-01" validTo="0001-01-01" /> 
  </passports>
  </person>
 <person key="92470" sourceKey="92470" packets="_1" services="" firstNameRus="TEST" lastNameRus="TEST" firstNameLat="TEST" lastNameLat="TEST" sex="male" birthday="1982-03-03" nationalityRus="" nationalityLat="" isTourist="true">
 <contacts>
 <phones>
  <phone /> 
  </phones>
 <addresses>
  <address postalIndex="" city="" street="" building="" flat="" /> 
  </addresses>
  </contacts>
 <passports>
  <passport type="foreign" series="1111" number="111111111" emittedBy="ОВД" emittedWhen="1990-01-01" validTo="2007-03-03" /> 
  <passport type="national" number="" emittedBy="" emittedWhen="0001-01-01" validTo="0001-01-01" /> 
  </passports>
  </person>
  </persons>
  </agreement>
  </agreements>