<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="https://www.omg.org/spec/DMN/20191111/MODEL/" id="Definitions_P10_NoShowPolicy" name="P10 No-Show Charge Policy" namespace="http://hotel-national-zermatt/dmn">
  <decision id="Decision_P10_NoShowChargePolicy" name="No-show charge policy">
    <decisionTable id="DecisionTable_P10_NoShowChargePolicy" hitPolicy="FIRST">
      <input id="Input_P10_RatePlan" label="Rate plan">
        <inputExpression id="InputExpression_P10_RatePlan" typeRef="string">
          <text>ratePlan</text>
        </inputExpression>
      </input>
      <input id="Input_P10_GuaranteeType" label="Guarantee type">
        <inputExpression id="InputExpression_P10_GuaranteeType" typeRef="string">
          <text>guaranteeType</text>
        </inputExpression>
      </input>
      <input id="Input_P10_Nights" label="Booked nights">
        <inputExpression id="InputExpression_P10_Nights" typeRef="number">
          <text>bookedNights</text>
        </inputExpression>
      </input>
      <input id="Input_P10_LateNoticeHours" label="Late notice hours before cutoff">
        <inputExpression id="InputExpression_P10_LateNoticeHours" typeRef="number">
          <text>lateNoticeHours</text>
        </inputExpression>
      </input>

      <output id="Output_P10_ChargeAllowed" label="Charge allowed" name="chargeAllowed" typeRef="boolean" />
      <output id="Output_P10_ChargeNights" label="Chargeable nights" name="chargeNights" typeRef="number" />
      <output id="Output_P10_Reason" label="Reason" name="reason" typeRef="string" />

      <rule id="Rule_P10_NonRefundable">
        <inputEntry id="Rule_P10_NonRefundable_Rate"><text>"non_refundable"</text></inputEntry>
        <inputEntry id="Rule_P10_NonRefundable_Guarantee"><text>-</text></inputEntry>
        <inputEntry id="Rule_P10_NonRefundable_Nights"><text>-</text></inputEntry>
        <inputEntry id="Rule_P10_NonRefundable_Notice"><text>-</text></inputEntry>
        <outputEntry id="Rule_P10_NonRefundable_Allowed"><text>true</text></outputEntry>
        <outputEntry id="Rule_P10_NonRefundable_NightsOut"><text>bookedNights</text></outputEntry>
        <outputEntry id="Rule_P10_NonRefundable_Reason"><text>"non-refundable booking"</text></outputEntry>
      </rule>

      <rule id="Rule_P10_GuaranteedStandard">
        <inputEntry id="Rule_P10_GuaranteedStandard_Rate"><text>-</text></inputEntry>
        <inputEntry id="Rule_P10_GuaranteedStandard_Guarantee"><text>"card"</text></inputEntry>
        <inputEntry id="Rule_P10_GuaranteedStandard_Nights"><text>&gt;= 2</text></inputEntry>
        <inputEntry id="Rule_P10_GuaranteedStandard_Notice"><text>&lt; 6</text></inputEntry>
        <outputEntry id="Rule_P10_GuaranteedStandard_Allowed"><text>true</text></outputEntry>
        <outputEntry id="Rule_P10_GuaranteedStandard_NightsOut"><text>1</text></outputEntry>
        <outputEntry id="Rule_P10_GuaranteedStandard_Reason"><text>"guaranteed booking no-show"</text></outputEntry>
      </rule>

      <rule id="Rule_P10_LateNoticeWaiver">
        <inputEntry id="Rule_P10_LateNoticeWaiver_Rate"><text>-</text></inputEntry>
        <inputEntry id="Rule_P10_LateNoticeWaiver_Guarantee"><text>-</text></inputEntry>
        <inputEntry id="Rule_P10_LateNoticeWaiver_Nights"><text>-</text></inputEntry>
        <inputEntry id="Rule_P10_LateNoticeWaiver_Notice"><text>&gt;= 6</text></inputEntry>
        <outputEntry id="Rule_P10_LateNoticeWaiver_Allowed"><text>false</text></outputEntry>
        <outputEntry id="Rule_P10_LateNoticeWaiver_NightsOut"><text>0</text></outputEntry>
        <outputEntry id="Rule_P10_LateNoticeWaiver_Reason"><text>"accepted late-arrival notice"</text></outputEntry>
      </rule>

      <rule id="Rule_P10_DefaultNoCharge">
        <inputEntry id="Rule_P10_DefaultNoCharge_Rate"><text>-</text></inputEntry>
        <inputEntry id="Rule_P10_DefaultNoCharge_Guarantee"><text>-</text></inputEntry>
        <inputEntry id="Rule_P10_DefaultNoCharge_Nights"><text>-</text></inputEntry>
        <inputEntry id="Rule_P10_DefaultNoCharge_Notice"><text>-</text></inputEntry>
        <outputEntry id="Rule_P10_DefaultNoCharge_Allowed"><text>false</text></outputEntry>
        <outputEntry id="Rule_P10_DefaultNoCharge_NightsOut"><text>0</text></outputEntry>
        <outputEntry id="Rule_P10_DefaultNoCharge_Reason"><text>"policy waiver"</text></outputEntry>
      </rule>
    </decisionTable>
  </decision>
</definitions>
