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

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

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

ราคาที่คำนวณจากข้อความ ExtraGuestCharges จะใช้ได้เฉพาะเมื่อเป็นไปตามข้อกำหนดความจุทั้งหมดเท่านั้น ดูธุรกรรม (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 ค่าทศนิยมที่เป็นบวกซึ่งระบุจำนวนคงที่ที่จะเรียกเก็บสำหรับผู้ใหญ่ที่เพิ่มเติมอีก 1 คน การเรียกเก็บเงินนี้ใช้สกุลเงินเดียวกับที่ระบุไว้สำหรับราคาต่อคืน
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 คุณต้องระบุแอตทริบิวต์เหล่านั้น 1 รายการเท่านั้นสำหรับ <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 กันยายน 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 ระบุว่า "เตียงควีนไซส์" หรือ "คิงไซส์" ที่มี "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

ตัวอย่าง

Success

การตอบกลับข้อความ 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>