<OTA_HotelRateAmountNotifRQ>
で送信された料金は、料金の元の宿泊人数に加えて、大人と子供を考慮して変更できます。ExtraGuestCharges
メッセージでは、これらの追加ゲストに対する料金の計算方法と、料金が適用される客室、料金プラン、滞在日を指定できます。
容量要件
ExtraGuestCharges
メッセージから計算された料金は、すべての容量要件が満たされている場合にのみ有効です。詳細については、Transaction(宿泊施設データ)をご覧ください。
リクエスト
構文
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 | このメッセージのパートナー アカウント。この文字列の値は、Hotel Center の
[アカウント設定] ページに表示されている Partner key の値です。注: 複数のアカウントのフィードを提供するバックエンドを使用している場合、この値は、同じアカウントの |
ExtraGuestCharges / @id | 1 | string | このリクエスト メッセージの一意の識別子。この値はレスポンス メッセージ内で返されます。使用できる文字は、a-z 、A-Z 、0-9 、_ (アンダースコア)、- (ダッシュ)です。 |
ExtraGuestCharges / @timestamp | 1 | DateTime | このメッセージの作成日時。 |
ExtraGuestCharges / HotelExtraGuestCharges | 0..n | HotelExtraGuestCharges | 1 つの宿泊施設の料金のコンテナ。 |
ExtraGuestCharges / HotelExtraGuestCharges / @hotel_id | 1 | string | 宿泊施設の一意の識別子。この値は、ホテルリスト フィードの
<listing> 要素の <id> を使用して指定した HotelID と一致する必要があります。HotelID は 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 | 追加の大人に請求する定額の金額を指定する正の 10 進数値。この請求には、宿泊料金で指定した通貨が使用されます。 |
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> で指定された料金が適用される年齢の上限。この <ChildAgeBracket> の前に他の <ChildAgeBracket> が指定されていない場合、最小年齢は 0 になります。それ以外の場合は、前のブラケットの最大年齢より 1 つ大きい値になります。 |
ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / AgeBrackets / ChildAgeBrackets / ChildAgeBracket / @exclude_from_capacity | 1 | boolean | この年齢層の子どもを客室の合計収容人数と子どもの収容人数に含めるかどうかを示すブール値。これらの容量は、 Transaction(宿泊施設データ)で設定できます。たとえば、一定の年齢未満の幼児は、子供の定員にカウントする必要がない場合があります。 |
ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / AgeBrackets / ChildAgeBrackets / ChildAgeBracket / @amount | 0..1 | float | この年齢層の追加の子どもに請求される定額の金額を指定する、負でない小数値。この請求には、宿泊料金で指定した通貨が使用されます。 |
ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / AgeBrackets / ChildAgeBrackets / ChildAgeBracket / @percentage | 0..1 | float | この年齢層の追加の子どもに請求する大人料金の割合を指定する 1 ~ 99 の 10 進数値。この請求には、宿泊料金で指定した通貨が使用されます。 大人料金の計算方法の詳細については、 |
ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / AgeBrackets / ChildAgeBrackets / ChildAgeBracket / @discount_amount | 0..1 | float | この年齢層の追加の子どもに対する大人料金の割引額を指定する正の 10 進数値。この請求には、宿泊料金で指定した通貨が使用されます。 通常、この年齢層の子供の料金は、「単価」から定額を差し引いて計算されます。単価については、 |
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 | 客室タイプを指定します。客室タイプは、Transaction(宿泊施設データ)メッセージの <RoomData> 要素で定義され、<RoomID> 値を使用して参照されます(その <RoomID> 値は、OTA_HotelRateAmountNotifRQ メッセージの InvTypeCode 属性でも参照されます)。 |
ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / RoomTypes / RoomType / @id | 1 | string | 在庫の一意の識別子(客室タイプ)。この値は、Transaction(宿泊施設データ)メッセージ内の <RoomID> に対応します。最大 50 文字まで使用できます。 |
ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / RatePlans | 0..1 | RatePlans | 料金が適用される料金プランのリストのコンテナ。<RatePlans> を指定しない場合、すべての料金プランに料金が適用されます。 |
ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / RatePlans / RatePlan | 1..n | RatePlan | 料金プランを指定します。料金プランは、パッケージ、料金、空室状況の組み合わせで定義されます。また、Transaction(宿泊施設データ)、OTA_HotelRateAmountNotifRQ、OTA_HotelAvailNotifRQ の各メッセージにより定義され、PackageID により識別されます。 |
ExtraGuestCharges / HotelExtraGuestCharges / ExtraGuestCharge / RatePlans / RatePlan / @id | 1 | string | 料金プランの一意の識別子。この値は PackageID の値に対応します。PackageID の値は、Transaction(宿泊施設データ)メッセージの <PackageData> と、<OTA_HotelRateAmountNotifRQ> メッセージと <OTA_HotelAvailNotifRQ> メッセージ両方の <StatusApplicationControl> の RatePlanCode 属性にあります。最大 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>
ユーザーが Google で大人 4 人を検索した場合、合計料金は 170 = 120 + 50 となります。
120 は NumberOfGuests="3"
の <BaseByGuestAmt>
レートから、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>
上記のメッセージは、2020 年 9 月 1 日から 2020 年 9 月 14 日までの期間に、料金プランが「free-wifi」または「hot-breakfast」で、客室タイプが「queen」または「king」の商品に対して、大人料金が請求されることを指定しています。
請求の重複
このセクションでは、同じ日付と商品の組み合わせに対して異なる料金を指定する無効なメッセージの例を示します。
<?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>
で、9 月 1 日から 14 日までの「queen」と「free-wifi」に大人 1 人につき 50 ドルの追加料金が適用されることが指定されているため、上記のメッセージは無効です。2 つ目の <ExtraGuestCharge>
は、9 月 1 ~ 5 日に「queen」または「king」のいずれか、「free-wifi」または「hot-breakfast」のいずれかを選択した場合、大人 1 人につき 20 ドルの追加料金が発生することを指定しています。9 月 1 日から 5 日までの「queen」と「free-wifi」の料金が重複しており、追加の大人 1 人に 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 | ExtraGuestCharges メッセージの処理中に発生した 1 つ以上の問題のコンテナ。
各メッセージには、 |
ExtraGuestChargesResponse / Issues / Issue | 1..n | Issue | ExtraGuestCharges メッセージの処理中に発生した警告、エラー、または失敗の説明。これらの問題の詳細については、フィード ステータスのエラー メッセージをご覧ください。 |
ExtraGuestChargesResponse / Issues / Issue / @code | 1 | integer | 問題の識別子。 |
ExtraGuestChargesResponse / Issues / Issue / @status | 1 | enum | 発生した問題の種類。 有効な値は |
例
成功
以下は、正常に処理された 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>