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

ราคาที่ส่งผ่าน <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

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

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

ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / AgeBrackets 1 AgeBrackets คอนเทนเนอร์ของกลุ่มอายุสำหรับคำนวณการเรียกเก็บเงินตามอายุหรือหมวดหมู่ผู้เข้าพัก
ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / AgeBrackets / AdultCharge 0..1 AdultCharge คอนเทนเนอร์สำหรับค่าใช้จ่ายสำหรับผู้ใหญ่อีก 1 คน
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> อื่นไว้ก่อน มิเช่นนั้นจะเป็นค่าที่มากกว่าอายุสูงสุดของกลุ่มก่อนหน้า 1 ปี
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) คุณควรใช้ราคาสำหรับผู้ใหญ่ 2 คนเนื่องจากไม่ควรรวมเด็ก

  • หากระบุ preferred ก็ควรรวมเด็กไว้ในอัตราการเข้าพักของราคา

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

  • หากระบุ always ไว้ เด็กควรรวมอยู่ในอัตราการเข้าพักของราคาเสมอ

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

ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / RoomTypes 0..1 RoomTypes คอนเทนเนอร์สำหรับรายการประเภทห้องพักที่ต้องเสียค่าใช้จ่าย การเรียกเก็บเงินจะมีผลกับ <RoomType> แต่ละรายการที่ระบุ หากไม่มีการระบุ <RoomTypes> ระบบจะเรียกเก็บเงินจากห้องพักทั้งหมดในที่พักที่ระบุ
ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / RoomTypes / RoomType 1..n RoomType ระบุประเภทห้องพัก ประเภทห้องพักจะระบุอยู่ในองค์ประกอบ <RoomData> ของข้อความ Transaction (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 ระบุแพ็กเกจราคา ระบบจะกำหนดแพ็กเกจราคาจากชุดค่าผสมของแพ็กเกจ ราคา และจำนวนห้องว่างตามที่ระบุไว้ในข้อความ Transaction (Property Data), 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>

ข้อความด้านบนระบุว่าควรเรียกเก็บเงินจากผู้ใหญ่สำหรับผลิตภัณฑ์ที่มีประเภทห้องพัก "ควีน" หรือ "คิง" ที่มีแพ็กเกจราคา "ฟรี Wi-Fi" หรือ "อาหารเช้าร้อน" ในวันที่ 1-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> แรกระบุไว้ว่า "queen" และ "free-wifi" สำหรับวันที่ 1-14 กันยายนควรเรียกเก็บเงินค่าบริการเพิ่มเติมสำหรับผู้ใหญ่ 50 <ExtraGuestCharge> ที่ 2 ระบุไว้ว่า "queen" หรือ "king" ที่มี "free-wifi" หรือ "hot-breakfast" สำหรับวันที่ 1-5 กันยายนควรเรียกเก็บเงินเพิ่มเติมจากผู้ใหญ่ 20 มีการเรียกเก็บเงินทับซ้อนกันสำหรับ "queen" และ "free-wifi" สำหรับวันที่ 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>