คุณแก้ไขราคาที่ส่งผ่าน <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
หมายเหตุ: หากคุณมีแบ็กเอนด์ที่มีฟีดสำหรับหลายบัญชี ค่านี้จะต้องตรงกับค่าแอตทริบิวต์ |
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 ชุด ข้อมูลนี้อาจมีข้อจำกัดเกี่ยวกับวิธีเรียกเก็บเงินและวิธีการคำนวณการเรียกเก็บเงินตามอายุหรือหมวดหมู่แขก
|
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 ต้องระบุแอตทริบิวต์เหล่านั้นอย่างน้อย 1 รายการสำหรับ <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 ซึ่งระบุเปอร์เซ็นต์ของราคาสำหรับผู้ใหญ่ที่ควรเรียกเก็บสำหรับเด็กเพิ่มเติมในวงเล็บนี้ การเรียกเก็บเงินนี้ใช้สกุลเงินเดียวกับที่ระบุไว้สำหรับราคาต่อคืน ดูรายละเอียดเกี่ยวกับวิธีการคำนวณราคาสำหรับผู้ใหญ่ได้จากการสนทนาในส่วน |
ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / AgeBrackets / ChildAgeBrackets / ChildAgeBracket / @discount_amount | 0..1 | float | ค่าทศนิยมบวกที่ระบุจำนวนส่วนลดคงที่จากราคาสำหรับผู้ใหญ่สำหรับเด็กเพิ่มเติมในวงเล็บนี้ การเรียกเก็บเงินนี้ใช้สกุลเงินเดียวกับที่ระบุไว้สำหรับราคาต่อคืน โดยทั่วไปแล้ว การเรียกเก็บเงินสำหรับเด็กในวงเล็บนี้คำนวณโดยการหักจำนวนคงที่ออกจาก "ราคาต่อหน่วย" เราจะอธิบายราคาต่อหน่วยอย่างละเอียดยิ่งขึ้นในส่วนแอตทริบิวต์ |
ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / AgeBrackets / ChildAgeBrackets / ChildAgeBracket / @counts_as_base_occupant | 0..1 | string | หากระบุแอตทริบิวต์ เป้าหมายก็คือการได้รับ "ราคาต่อหน่วย" ซึ่งใช้คำนวณค่าใช้จ่ายจริงได้
ค่าของแอตทริบิวต์นี้ต้องเป็น
|
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" เป็นการระบุว่าระบบอนุญาตให้ใช้วันธรรมดาในช่วงวันที่ อักขระที่ใช้ได้มีดังนี้
ชุดค่าผสมของอักขระแบบใดก็ได้สามารถใช้ได้ |
ตัวอย่าง
ค่าบริการสำหรับผู้ใหญ่
ค่าใช้จ่ายสำหรับผู้ใหญ่เพิ่มเติมสามารถแสดงเป็นจำนวนคงที่เท่านั้น ตัวอย่างต่อไปนี้แสดงข้อความ 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 เรียบร้อยแล้วโดยไม่มีคำเตือน ข้อผิดพลาด หรือความล้มเหลว
แต่ละข้อความจะมี |
ExtraGuestChargesResponse / Issues | 0..1 | Issues | คอนเทนเนอร์สำหรับปัญหาอย่างน้อย 1 รายการที่พบขณะประมวลผลข้อความ ExtraGuestCharges
แต่ละข้อความจะมี |
ExtraGuestChargesResponse / Issues / Issue | 1..n | Issue | คำอธิบายของคำเตือน ข้อผิดพลาด หรือความล้มเหลวที่พบขณะประมวลผลข้อความ ExtraGuestCharges ดูรายละเอียดเกี่ยวกับปัญหาเหล่านี้ได้ในข้อความแสดงข้อผิดพลาดของสถานะฟีด |
ExtraGuestChargesResponse / Issues / Issue / @code | 1 | integer | ตัวระบุสำหรับปัญหา |
ExtraGuestChargesResponse / Issues / Issue / @status | 1 | enum | ประเภทของปัญหาที่พบ ค่าที่ถูกต้องคือ |
ตัวอย่าง
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>