ExtraGuestCharges

คุณสามารถแก้ไขราคาที่ส่งผ่าน <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 คอนเทนเนอร์สำหรับค่าใช้จ่ายสำหรับผู้ใหญ่เพิ่มเติม
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>

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