ค่าบริการแขกเพิ่มเติม

ราคาที่ส่งผ่าน <OTA_HotelRateAmountNotifRQ> ได้ เปลี่ยนไปเป็นราคาสำหรับผู้ใหญ่และเด็ก นอกเหนือจากราคาเดิม จำนวนแขก ข้อความ ExtraGuestCharges ช่วยให้ เกี่ยวกับวิธีการคำนวณราคาสำหรับแขกเพิ่มเติมเหล่านี้ ค่าบริการห้องพัก แพ็กเกจราคา และวันที่เข้าพัก

ข้อกำหนดด้านความจุ

ราคาที่คำนวณจากข้อความ ExtraGuestCharges จะใช้ได้เฉพาะเมื่อทั้งหมด เป็นไปตามข้อกำหนดด้านความจุ ดู Transaction (Property Data) เพื่อดูข้อมูลเพิ่มเติม

คำขอ

ไวยากรณ์

ข้อความ ExtraGuestCharges ใช้ไวยากรณ์ต่อไปนี้

<?xml version="1.0" encoding="UTF-8"?>
<ExtraGuestCharges partner="partner_account_name"
                   id="message_ID"
                   timestamp="timestamp">
  <HotelExtraGuestCharges hotel_id="HotelID" action="[overlay]">
    <ExtraGuestCharge>
      <RatePlans>
        <RatePlan id="PackageID_1"/>
        <RatePlan id="PackageID_2"/>
      </RatePlans>
      <RoomTypes>
        <RoomType id="RoomID_1"/>
        <RoomType id="RoomID_2"/>
      </RoomTypes>
      <StayDates>
        <DateRange start="YYYY-MM-DD" end="YYYY-MM-DD"
                   days_of_week="MTWHFSU_or_subset"/>
      </StayDates>
      <AgeBrackets>
        <AdultCharge amount="float"/>
        <ChildAgeBrackets>
        <!-- The following are different ways child charges can be specified.
        Use the option that matches your system. -->
          <ChildAgeBracket max_age="integer" amount="float"
                           exclude_from_capacity="[true|false]"/>
          <ChildAgeBracket max_age="integer" percentage="float"
                           exclude_from_capacity="[true|false]"
                           counts_as_base_occupant="[never|preferred|always]"/>
          <ChildAgeBracket max_age="integer" discount_amount="float"
                           exclude_from_capacity="[true|false]"
                           counts_as_base_occupant="[never|preferred|always]"/>
        </ChildAgeBrackets>
      </AgeBrackets>
    </ExtraGuestCharge>
  </HotelExtraGuestCharges>
</ExtraGuestCharges>

องค์ประกอบและ ลักษณะ

ข้อความ ExtraGuestCharges มีองค์ประกอบต่อไปนี้และ ดังนี้

องค์ประกอบ / @แอตทริบิวต์ จำนวนข้อผิดพลาด ประเภท คำอธิบาย
ExtraGuestCharges 1 Complex element องค์ประกอบรูทของข้อความนี้
ExtraGuestCharges / @partner 1 string บัญชีพาร์ทเนอร์สำหรับข้อความนี้ ค่าสตริงนี้คือค่า มีค่า Partner key แสดงบน หน้าการตั้งค่าบัญชีใน Hotel Center

หมายเหตุ: หากคุณมีแบ็กเอนด์ที่มีฟีดสำหรับ หลายบัญชี ค่านี้ต้องตรงกับ ID ที่ระบุใน <RequestorID> องค์ประกอบของ <OTA_HotelRateAmountNotifRQ> และ <OTA_HotelAvailNotifRQ> ข้อความสำหรับ ของคุณได้

ExtraGuestCharges / @id 1 string ตัวระบุที่ไม่ซ้ำกันสำหรับข้อความคำขอนี้ ระบบแสดงผลค่านี้ ในข้อความตอบกลับ อักขระที่อนุญาตคือ a-z A-Z, 0-9, _ (ขีดล่าง) และ - (ขีดกลาง)
ExtraGuestCharges / @timestamp 1 DateTime วันที่และเวลาที่สร้างข้อความนี้
ExtraGuestCharges / HotelExtraGuestCharges 0..n HotelExtraGuestCharges คอนเทนเนอร์สำหรับการเรียกเก็บเงินสำหรับที่พักแห่งเดียว
ExtraGuestCharges / HotelExtraGuestCharges / @hotel_id 1 string ตัวระบุที่ไม่ซ้ำกันของที่พัก ค่านี้ต้องตรงกับแอตทริบิวต์ รหัสโรงแรมที่ระบุโดยใช้ <id> ในองค์ประกอบ <listing> ในฟีดข้อมูลโรงแรม นอกจากนี้ รหัสโรงแรมยังอยู่ใน Hotel Center ด้วย
ExtraGuestCharges / HotelExtraGuestCharges / @action 0..1 enum ระบุวิธีการนำการอัปเดตไปใช้ เฉพาะ overlay ที่ และค่าเริ่มต้นคือโฆษณาซ้อนทับ การเรียกเก็บเงินใดๆ ก่อนหน้านี้ คุณสมบัติจะถูกล้างก่อนที่จะใช้การอัปเดต
ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge 0..99 ExtraGuestCharge

การเรียกเก็บเงินสำหรับที่พัก 1 ชุด อาจมี ข้อจำกัดเกี่ยวกับวิธีเรียกเก็บเงินและวิธีเรียกเก็บเงิน ที่คำนวณตามอายุหรือหมวดหมู่แขก

ExtraGuestCharge แต่ละรายการภายใน HotelExtraGuestCharges ต้องใช้กับชุดวันที่ที่ไม่ซ้ำกัน และผลิตภัณฑ์ หากองค์ประกอบ ExtraGuestCharge 2 รายการอ้างอิงถึงค่าเดียวกัน ชุดค่าผสมวันที่-ผลิตภัณฑ์ ข้อความทั้งหมดจะถูกปฏิเสธ

ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / AgeBrackets 1 AgeBrackets คอนเทนเนอร์ของช่วงอายุที่ใช้คำนวณการเรียกเก็บเงินตามอายุหรือ หมวดหมู่ผู้เข้าร่วม
ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / AgeBrackets / AdultCharge 0..1 AdultCharge ภาชนะสำหรับการเรียกเก็บเงินสำหรับผู้ใหญ่เพิ่มเติม
ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / AgeBrackets / AdultCharge / @amount 0..1 float ค่าทศนิยมบวกที่ระบุจำนวนคงที่ที่จะเป็น ซึ่งเรียกเก็บสำหรับผู้ใหญ่ที่เกินมา การเรียกเก็บเงินนี้ใช้สกุลเงินเดียวกับ ที่ระบุไว้สำหรับราคาต่อคืน
ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / AgeBrackets / ChildAgeBrackets 0..1 ChildAgeBrackets คอนเทนเนอร์สำหรับการเรียกเก็บเงินย่อยเพิ่มเติม กลุ่มอายุเหล่านี้อาจ ครอบคลุมช่วงอายุตั้งแต่ 0-17 ปี
ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / AgeBrackets / ChildAgeBrackets / ChildAgeBracket 1..99 ChildAgeBracket การเรียกเก็บเงินที่มีผลกับเด็กในช่วงอายุที่เฉพาะเจาะจง เหล่านี้ ควรเรียงลำดับจากต่ำสุด max_age ไปสูงสุด max_age ระบุจำนวนเงินที่จะเรียกเก็บได้โดยใช้ amount, percentage หรือ discount_amount หนึ่งในแอตทริบิวต์เหล่านั้นต้องเป็น ที่ระบุสำหรับแต่ละ <ChildAgeBracket>
ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / AgeBrackets / ChildAgeBrackets / ChildAgeBracket / @max_age 1 integer อายุสูงสุดที่ระบุไว้ใน อาจมี<ChildAgeBracket> อายุขั้นต่ำคือ 0 หากไม่มีการระบุ <ChildAgeBracket> อื่นไว้ ก่อนที่จะสร้าง มิเช่นนั้น จะมีขนาดใหญ่กว่า อายุสูงสุด
ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / AgeBrackets / ChildAgeBrackets / ChildAgeBracket / @exclude_from_capacity 1 boolean บูลีนที่ระบุว่าเด็กในกลุ่มอายุนี้ควร นับรวมในความจุทั้งหมดของห้องและความจุย่อยของห้อง เหล่านี้ สามารถตั้งค่าความจุด้วย Transaction(Property Data) เช่น ทารกที่มีอายุต่ำกว่าเกณฑ์ที่กำหนด อาจไม่จำเป็นต้องนับรวมกับความจุย่อย
ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / AgeBrackets / ChildAgeBrackets / ChildAgeBracket / @amount 0..1 float ค่าทศนิยมที่ไม่เป็นลบซึ่งระบุจำนวนคงที่ที่จะเป็น สำหรับเด็กเพิ่มเติมในกลุ่มนี้ การเรียกเก็บเงินนี้ใช้ สกุลเงินเดียวกับที่ระบุไว้สำหรับราคาต่อคืน
ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / AgeBrackets / ChildAgeBrackets / ChildAgeBracket / @percentage 0..1 float

ค่าทศนิยมตั้งแต่ 1-99 ซึ่งระบุเปอร์เซ็นต์ของ ราคาสำหรับผู้ใหญ่ที่ควรเรียกเก็บสำหรับเด็กเพิ่มเติมใน วงเล็บ การเรียกเก็บเงินนี้ใช้สกุลเงินเดียวกับที่ระบุไว้สำหรับ ราคาต่อคืน

ดูรายละเอียดการสนทนาภายใต้ counts_as_base_occupant เกี่ยวกับวิธีคำนวณราคาสำหรับผู้ใหญ่

ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / AgeBrackets / ChildAgeBrackets / ChildAgeBracket / @discount_amount 0..1 float

ค่าทศนิยมบวกที่ระบุส่วนลดคงที่ ให้ส่วนลดเป็นจำนวนเงินของราคาสำหรับผู้ใหญ่ สำหรับเด็กเพิ่มเติมในวงเล็บนี้ การเรียกเก็บเงินนี้ใช้สกุลเงินเดียวกับที่ระบุไว้สำหรับต่อคืน

โดยทั่วไป การเรียกเก็บเงินสำหรับเด็กในวงเล็บนี้คำนวณโดย การหักเงินคงที่จาก "ราคาต่อหน่วย" ราคาต่อหน่วยคือ พูดคุยอย่างละเอียดยิ่งขึ้นภายใต้counts_as_base_occupant ส่วน

ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / AgeBrackets / ChildAgeBrackets / ChildAgeBracket / @counts_as_base_occupant 0..1 string

หาก percentage หรือ discount_amount แล้ว counts_as_base_occupant จะต้อง ด้วย ค่านี้จะกำหนดว่าบุตรหลานควร รวมอยู่ใน NumberOfGuest เมื่อคุณเลือก อัตรา <BaseByGuestAmount> สำหรับการใช้เปอร์เซ็นต์ การเรียกเก็บเงินและส่วนลด

เป้าหมายก็คือการได้รับ "ราคาต่อหน่วย" จากองค์ประกอบ สามารถช่วยคำนวณค่าบริการได้

unit price = rate / occupancy

ค่าของแอตทริบิวต์นี้ต้องเป็น never preferred หรือ always

  • หากระบุ never แล้ว ก็ไม่ควรเป็น รวมอยู่ในอัตราการเข้าพักของราคานี้

    หากต้องการคำนวณอัตราสำหรับผู้ใหญ่ 2 คนและเด็ก 2 คน (2 คนขึ้นไป) คุณควรใช้ราคาสำหรับผู้ใหญ่ 2 คนเพราะเด็กๆ ไม่ควรรวมไว้

  • หากระบุ preferred แล้ว ผู้เผยแพร่โฆษณาย่อยควร เราขอแนะนำให้รวมอยู่ในอัตราการเข้าพัก

    หากต้องการคำนวณอัตราสำหรับผู้ใหญ่ 2 คนและเด็ก 1 คน (2 คนขึ้นไป) คุณควรใช้ราคาสำหรับผู้ใหญ่ 3 คนในกรณีที่ไม่สามารถ คุณควรใช้ราคาสำหรับผู้ใหญ่ 2 คน

  • หากระบุ always แล้ว ผู้เผยแพร่โฆษณาย่อยควร จะรวมอยู่ในอัตราการเข้าพักของราคาเสมอ

    หากต้องการคำนวณอัตราสำหรับผู้ใหญ่ 2 คนและเด็ก 2 คน (2 คนขึ้นไป) คุณควรใช้ราคาสำหรับผู้ใหญ่ 4 คนเนื่องจากเด็กต้อง ด้วย

ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / RoomTypes 0..1 RoomTypes คอนเทนเนอร์สำหรับรายการประเภทห้องพักที่มีการเรียกเก็บเงิน การเรียกเก็บเงินจะมีผลกับ <RoomType> ที่ระบุไว้ หากไม่ได้ระบุ <RoomTypes> ค่า จะมีการเรียกเก็บเงินกับห้องพักทุกห้องภายในที่พักที่ระบุ
ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / RoomTypes / RoomType 1..n RoomType ระบุประเภทห้องพัก ประเภทห้องพักจะกำหนดไว้ใน องค์ประกอบ <RoomData> ใน ธุรกรรม (Property Data) และมีการอ้างอิงโดยใช้ <RoomID> (<RoomID> ค่ายังอ้างอิงโดยแอตทริบิวต์ InvTypeCode ใน ข้อความ OTA_HotelRateAmountNotifRQ)
ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / RoomTypes / RoomType / @id 1 string ตัวระบุที่ไม่ซ้ำกันสำหรับห้องพัก (ประเภทห้องพัก) ค่านี้จะแมป กับ <RoomID> ในข้อความ Transaction (Property Data) จำนวนอักขระสูงสุดที่อนุญาตคือ 50 ตัว
ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / RatePlans 0..1 RatePlans คอนเทนเนอร์สำหรับรายการแพ็กเกจราคาที่มีการเรียกเก็บเงิน หากไม่ได้ระบุ <RatePlans> จะหมายถึงการเรียกเก็บเงิน มีผลกับแพ็กเกจราคาทั้งหมด
ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / RatePlans / RatePlan 1..n RatePlan ระบุแพ็กเกจราคา แพ็กเกจราคากำหนดโดยชุดค่าผสมของ แพ็กเกจ ราคา และห้องว่างตามที่ระบุไว้ใน "ธุรกรรม" (ข้อมูลที่พัก), OTA_HotelRateAmountNotifRQ และ OTA_HotelAvailNotifRQ และตามที่ระบุโดย PackageID
ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / RatePlans / RatePlan / @id 1 string ตัวระบุที่ไม่ซ้ำกันสำหรับแพ็กเกจราคา ค่านี้จะแมปกับ ค่า PackageID ใน <PackageData> ในข้อความ Transaction (Property Data) และใน RatePlanCode แอตทริบิวต์ใน <StatusApplicationControl> ในทั้งสองที่ <OTA_HotelRateAmountNotifRQ> และ <OTA_HotelAvailNotifRQ> ข้อความ จำนวนอักขระสูงสุดที่อนุญาตคือ 50 ตัว
ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / StayDates 0..1 StayDates คอนเทนเนอร์สำหรับช่วงวันที่อย่างน้อย 1 ช่วงซึ่งกำหนดวิธีการตั้งค่า มีค่าบริการ
ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / StayDates / DateRange 1..99 DateRange ช่วงวันที่ที่ระบุวันที่ที่จะใช้โปรโมชัน
ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / StayDates / DateRange / @start 0..1 Date วันที่เริ่มต้น (ตามเขตเวลาของที่พัก) ซึ่งก็คือ ช่วงวันที่ วันที่นี้ต้องเป็นวันที่ก่อนวันที่ หรือวันที่เดียวกับ end หากไม่ได้ระบุ start จะเป็นวันที่ ไม่มีการกำหนดช่วงของวันที่เริ่มต้นที่มีประสิทธิภาพ
ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / StayDates / DateRange / @end 0..1 Date วันที่สิ้นสุด (ตามเขตเวลาของที่พัก) ของ ช่วงวันที่ วันที่นี้ต้องเป็นวันที่เดียวกับหรือหลังจาก start วันที่ หากไม่ได้ระบุ end จะเป็นวันที่ ไม่มีการกำหนดช่วงวันที่สิ้นสุดที่มีประสิทธิภาพ
ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / StayDates / DateRange / @days_of_week 0..1 string

วันของสัปดาห์ที่อนุญาตในช่วงวันที่ หากไม่ ระบบจะอนุญาตให้ใช้ทุกวันในช่วงวันที่ ชิ้น อักขระในสตริงระบุวัน เช่น "MTWHF" ระบุ อนุญาตให้ใช้วันธรรมดาในช่วงวันที่

อักขระที่ใช้ได้มีดังนี้

  • M สำหรับวันจันทร์
  • T สำหรับวันอังคาร
  • W สำหรับวันพุธ
  • H สำหรับวันพฤหัสบดี
  • F สำหรับวันศุกร์
  • S สำหรับวันเสาร์
  • U สำหรับวันอาทิตย์

ชุดค่าผสมของอักขระแบบใดก็ได้สามารถใช้ได้

ตัวอย่าง

ค่าบริการสำหรับผู้ใหญ่

ค่าใช้จ่ายสำหรับผู้ใหญ่เพิ่มเติมสามารถแสดงเป็นจำนวนคงที่เท่านั้น ตัวอย่างต่อไปนี้แสดงข้อความ ExtraGuestCharges ที่ระบุว่าเป็นผู้ใหญ่ ค่าบริการ:

<?xml version="1.0" encoding="UTF-8"?>
<ExtraGuestCharges timestamp="2001-02-03T04:05:06+00:00" id="1">
  <HotelExtraGuestCharges hotel_id="ABC" action="overlay">
    <ExtraGuestCharge>
      <StayDates />
      <AgeBrackets>
        <AdultCharge amount="50" />
      </AgeBrackets>
    </ExtraGuestCharge>
  </HotelExtraGuestCharges>
</ExtraGuestCharges>

ราคาที่เกี่ยวข้องมีดังนี้

<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelRateAmountNotifRQ xmlns="http://www.opentravel.org/OTA/2003/05"
                            EchoToken="12345678"
                            TimeStamp="2020-05-19T20:50:37-05:00"
                            Version="3.0">
  <RateAmountMessages HotelCode="ABC">
    <RateAmountMessage>
      <StatusApplicationControl Start="2020-05-18"
                                End="2020-05-23"
                                InvTypeCode="RoomID_1"
                                RatePlanCode="PackageID_1"/>
      <Rates>
        <Rate>
          <BaseByGuestAmts>
            <BaseByGuestAmt AmountAfterTax="100.00"
                            CurrencyCode="USD"
                            NumberOfGuests="1"/>
            <BaseByGuestAmt AmountAfterTax="110.00"
                            CurrencyCode="USD"
                            NumberOfGuests="2"/>
            <BaseByGuestAmt AmountAfterTax="120.00"
                            CurrencyCode="USD"
                            NumberOfGuests="3"/>
          </BaseByGuestAmts>
        </Rate>
      </Rates>
    </RateAmountMessage>
  </RateAmountMessages>
</OTA_HotelRateAmountNotifRQ>

เมื่อผู้ใช้ค้นหาสำหรับผู้ใหญ่ 4 คนใน Google ราคารวมจะเป็น 170 = 120 + 50

120 มาจากราคา <BaseByGuestAmt> ซึ่งเท่ากับ NumberOfGuests="3" และ 50 มาจาก AdultCharge amount="50"

การเรียกเก็บเงินสำหรับเด็ก

ค่าใช้จ่ายสำหรับเด็กจะแสดงในกลุ่มอายุไม่เกิน 17 ปีและอาจ แสดงในจำนวนคงที่ เปอร์เซ็นต์ หรือส่วนลด

ตัวอย่างต่อไปนี้แสดงข้อความ ExtraGuestCharges ที่ระบุว่า การเรียกเก็บเงินสำหรับเด็ก:

<?xml version="1.0" encoding="UTF-8"?>
<ExtraGuestCharges timestamp="2001-02-03T04:05:06+00:00" id="1">
  <HotelExtraGuestCharges hotel_id="ABC" action="overlay">
    <ExtraGuestCharge>
      <AgeBrackets>
        <ChildAgeBrackets>
          <ChildAgeBracket max_age="3" percentage="10"
                           counts_as_base_occupant="never" />
          <ChildAgeBracket max_age="10" percentage="30"
                           counts_as_base_occupant="preferred"/>
          <ChildAgeBracket max_age="17" discount_amount="10"
                           counts_as_base_occupant="always" />
        </ChildAgeBrackets>
      </AgeBrackets>
    </ExtraGuestCharge>
  </HotelExtraGuestCharges>
</ExtraGuestCharges>

ราคาที่เกี่ยวข้องมีดังนี้

<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelRateAmountNotifRQ xmlns="http://www.opentravel.org/OTA/2003/05"
                            EchoToken="12345678"
                            TimeStamp="2020-05-19T20:50:37-05:00"
                            Version="3.0">
  <RateAmountMessages HotelCode="ABC">
    <RateAmountMessage>
      <StatusApplicationControl Start="2020-05-18"
                                End="2020-05-23"
                                InvTypeCode="RoomID_1"
                                RatePlanCode="PackageID_1"/>
      <Rates>
        <Rate>
          <BaseByGuestAmts>
            <BaseByGuestAmt AmountAfterTax="100.00"
                            CurrencyCode="USD"
                            NumberOfGuests="1"/>
            <BaseByGuestAmt AmountAfterTax="110.00"
                            CurrencyCode="USD"
                            NumberOfGuests="2"/>
          </BaseByGuestAmts>
        </Rate>
      </Rates>
    </RateAmountMessage>
  </RateAmountMessages>
</OTA_HotelRateAmountNotifRQ>
```

  1.  Suppose you want the total price for 2 adults and 1 child of 2 years
      of age.

      Children aged 0-3 are never included in the rate's occupancy,
      so here you should take the double occupancy rate and divide by 2 to
      get the unit price. Then, multiply by the percentage rate and sum
      with the rate to get the total price.

      `unit price ` = 110 / 2 = 55

      `total price` = 110 + 55 * 0.1 = 115.5

  1.  Suppose you want the total price for 1 adult and 2 children, both of 5
      years of age.

      Children aged 4-10 are preferably included in the rate's
      occupancy. you should start by looking for a 3 adult rate since both
      children are preferably included in the rate's occupancy. Since
      that doesn't exist you should fall back to the 2 adult rate and then,
      take this rate and divide by two to get the unit price. Finally,
      multiply by the percentage rate and sum with the scaled rate to
      get the total price.

      `unit price` = 110 / 2 = 55

      `total price` = 55 + 55 * 0.3 + 55 * 0.3 = 88

  1.  Suppose you want the total price for 1 adult and 1 child of 17
      years of age.

      Children aged 11-17 are always included in the rate's occupancy, so,
      in this case, take the double occupancy rate and divide by 2 to get
      the unit price. Then, deduct it by the discount amount and sum with
      the scaled rate to get the total price.

      `unit price` = 110 / 2 = 55

      `total price` = 55 + (55 - 10) = 100

ข้อจำกัดในการเรียกเก็บเงิน

ข้อจำกัดทุกประเภทเป็นแบบไม่บังคับ และจะใช้ร่วมกันอย่างไรก็ได้ ที่ใช้

ตัวอย่างต่อไปนี้แสดงข้อความ ExtraGuestCharges ที่ระบุว่า ข้อจำกัด:

<?xml version="1.0" encoding="UTF-8"?>
<ExtraGuestCharges timestamp="2001-02-03T04:05:06+00:00" id="1">
  <HotelExtraGuestCharges hotel_id="ABC" action="overlay">
    <ExtraGuestCharge>
      <RoomTypes>
        <RoomType id="queen" />
        <RoomType id="king" />
      </RoomTypes>
      <RatePlans>
        <RatePlan id="free-wifi" />
        <RatePlan id="hot-breakfast" />
      </RatePlans>
      <StayDates>
        <DateRange start="2020-09-01" end="2020-09-14"/>
      </StayDates>
      <AgeBrackets>
        <AdultCharge amount="50" />
      </AgeBrackets>
    </ExtraGuestCharge>
  </HotelExtraGuestCharges>
</ExtraGuestCharges>

ข้อความด้านบนระบุว่าผู้ใหญ่ควรเป็นผู้เรียกเก็บเงินสำหรับผลิตภัณฑ์ใดก็ได้ ที่มีประเภทห้องพักเป็น "เตียงควีนไซส์" หรือ "king" ด้วยแพ็กเกจราคา "Wi-Fi ฟรี" หรือ "อาหารเช้าร้อน" สำหรับวันที่ 1 กันยายน 2020 ถึง 14 กันยายน 2020

ค่าบริการทับซ้อน

ส่วนนี้จะแสดงตัวอย่างของข้อความที่ไม่ถูกต้องที่ระบุความแตกต่าง เรียกเก็บเงินสำหรับชุดค่าผสมของวันที่และผลิตภัณฑ์ที่เหมือนกัน


<?xml version="1.0" encoding="UTF-8"?>
<ExtraGuestCharges timestamp="2001-02-03T04:05:06+00:00" id="1">
  <HotelExtraGuestCharges hotel_id="ABC" action="overlay">
    <ExtraGuestCharge>
      <RoomTypes>
        <RoomType id="queen" />
      </RoomTypes>
      <RatePlans>
        <RatePlan id="free-wifi" />
      </RatePlans>
      <StayDates>
        <DateRange start="2020-09-01" end="2020-09-14"/>
      </StayDates>
      <AgeBrackets>
        <AdultCharge amount="50" />
      </AgeBrackets>
    </ExtraGuestCharge>
    <ExtraGuestCharge>
      <RoomTypes>
        <RoomType id="queen" />
        <RoomType id="king" />
      </RoomTypes>
      <RatePlans>
        <RatePlan id="free-wifi" />
        <RatePlan id="hot-breakfast" />
      </RatePlans>
      <StayDates>
        <DateRange start="2020-09-01" end="2020-09-05"/>
      </StayDates>
      <AgeBrackets>
        <AdultCharge amount="20" />
      </AgeBrackets>
    </ExtraGuestCharge>
  </HotelExtraGuestCharges>
</ExtraGuestCharges>

ข้อความด้านบนไม่ถูกต้องเนื่องจาก <ExtraGuestCharge> แรก ระบุว่า "ราชินี" และ "Wi-Fi ฟรี" สำหรับวันที่ 1-14 กันยายนควรเรียกเก็บเงิน ผู้ใหญ่เพิ่มเติม 50 คน <ExtraGuestCharge>ที่ 2 ระบุว่าอะไรก็ได้ใน "ราชินี" หรือ "king" ที่มี "Wi-Fi ฟรี" แบบใดก็ได้ หรือ "อาหารเช้าร้อน" วันที่ 1-5 กันยายนจะมีค่าใช้จ่ายสำหรับผู้ใหญ่เพิ่ม 20 คน มีการเรียกเก็บเงินที่ทับซ้อนกันสำหรับ "ราชินี" และ "Wi-Fi ฟรี" สำหรับวันที่ 1 กันยายนถึง 5 และความขัดแย้งระหว่างการเรียกเก็บเงิน 20 หรือ 50 สำหรับผู้ใหญ่ที่เพิ่มเข้ามา

การตอบกลับ

ไวยากรณ์

ข้อความ ExtraGuestChargesResponse ใช้รายการต่อไปนี้ ไวยากรณ์:

<?xml version="1.0" encoding="UTF-8"?>
<ExtraGuestChargesResponse timestamp="timestamp"
                    id="message_ID"
                    partner="partner_key">
  <!-- Either Success or Issues will be populated. -->
  <Success/>
  <Issues>
    <Issue code="issue_code" status="issue_type">issue_description</Issue>
  </Issues>
</ExtraGuestChargesResponse>

องค์ประกอบและ ลักษณะ

ข้อความ ExtraGuestChargesResponse มีองค์ประกอบต่อไปนี้ และแอตทริบิวต์ดังนี้

องค์ประกอบ / @แอตทริบิวต์ จำนวนข้อผิดพลาด ประเภท คำอธิบาย
ExtraGuestChargesResponse 1 Complex element องค์ประกอบรูทที่ระบุความสำเร็จหรือปัญหาสำหรับ ส่งข้อความคำขอ ExtraGuestCharges
ExtraGuestChargesResponse / @timestamp 1 DateTime วันที่และเวลาที่สร้างข้อความนี้
ExtraGuestChargesResponse / @id 1 string ตัวระบุที่ไม่ซ้ำกันจากข้อความ ExtraGuestCharges ที่เชื่อมโยง
ExtraGuestChargesResponse / @partner 1 string บัญชีพาร์ทเนอร์สำหรับข้อความนี้
ExtraGuestChargesResponse / Success 0..1 Success บ่งบอกว่าประมวลผลข้อความ ExtraGuestCharges เรียบร้อยแล้ว โดยไม่มีคำเตือน ข้อผิดพลาด หรือความล้มเหลว

<Success> หรือ <Issues> อาจเป็น ที่อยู่ในแต่ละข้อความ

ExtraGuestChargesResponse / Issues 0..1 Issues คอนเทนเนอร์สำหรับปัญหาอย่างน้อย 1 รายการที่พบขณะประมวลผล ExtraGuestCharges ข้อความ

<Success> หรือ <Issues> อาจเป็น ที่อยู่ในแต่ละข้อความ

ExtraGuestChargesResponse / Issues / Issue 1..n Issue คำอธิบายของคำเตือน ข้อผิดพลาด หรือความล้มเหลวที่พบขณะ กำลังประมวลผลข้อความ ExtraGuestCharges ดูรายละเอียดเกี่ยวกับปัญหาเหล่านี้ได้ ในข้อความแสดงข้อผิดพลาดของสถานะฟีด
ExtraGuestChargesResponse / Issues / Issue / @code 1 integer ตัวระบุสำหรับปัญหา
ExtraGuestChargesResponse / Issues / Issue / @status 1 enum

ประเภทของปัญหาที่พบ

ค่าที่ถูกต้องคือ warning, error และ failure

ตัวอย่าง

สำเร็จ

การตอบกลับการประมวลผลสำเร็จมีดังนี้ ExtraGuestCharges ข้อความ

<?xml version="1.0" encoding="UTF-8"?>
<ExtraGuestChargesResponse timestamp="2020-05-18T16:20:00-04:00"
                    id="12345678"
                    partner="partner_key">
  <Success/>
</ExtraGuestChargesResponse>

ปัญหา

การตอบกลับข้อความ ExtraGuestCharges ที่ไม่ได้ประมวลผลมีดังนี้ เนื่องจากข้อผิดพลาด

<?xml version="1.0" encoding="UTF-8"?>
<ExtraGuestChargesResponse timestamp="2020-05-18T16:20:00-04:00"
                    id="12345678"
                    partner="partner_key">
  <Issues>
    <Issue code="1001" status="error">Example</Issue>
  </Issues>
</ExtraGuestChargesResponse>