<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="https://www.omg.org/spec/DMN/20191111/MODEL/" id="Definitions_P09_CancellationFee" name="P09 Cancellation Fee Determination" namespace="http://hotel-national-zermatt/dmn">
  <decision id="Decision_P09_CancellationFeeDetermination" name="Cancellation fee determination">
    <decisionTable id="DecisionTable_P09_CancellationFeeDetermination" hitPolicy="FIRST">
      <input id="Input_P09_RatePlan" label="Rate plan">
        <inputExpression id="InputExpression_P09_RatePlan" typeRef="string">
          <text>ratePlan</text>
        </inputExpression>
      </input>
      <input id="Input_P09_HoursToArrival" label="Hours to arrival">
        <inputExpression id="InputExpression_P09_HoursToArrival" typeRef="number">
          <text>hoursToArrival</text>
        </inputExpression>
      </input>
      <input id="Input_P09_NoShow" label="No-show">
        <inputExpression id="InputExpression_P09_NoShow" typeRef="boolean">
          <text>isNoShow</text>
        </inputExpression>
      </input>
      <input id="Input_P09_ChannelType" label="Channel type">
        <inputExpression id="InputExpression_P09_ChannelType" typeRef="string">
          <text>channelType</text>
        </inputExpression>
      </input>

      <output id="Output_P09_Allowed" label="Cancellation allowed" name="cancellationAllowed" typeRef="boolean" />
      <output id="Output_P09_FeePercent" label="Fee percent" name="feePercent" typeRef="number" />
      <output id="Output_P09_RefundPercent" label="Refund percent" name="refundPercent" typeRef="number" />
      <output id="Output_P09_Reason" label="Reason" name="reason" typeRef="string" />

      <rule id="Rule_P09_NoShow">
        <inputEntry id="Rule_P09_NoShow_Rate"><text>-</text></inputEntry>
        <inputEntry id="Rule_P09_NoShow_Hours"><text>-</text></inputEntry>
        <inputEntry id="Rule_P09_NoShow_NoShow"><text>true</text></inputEntry>
        <inputEntry id="Rule_P09_NoShow_Channel"><text>-</text></inputEntry>
        <outputEntry id="Rule_P09_NoShow_Allowed"><text>false</text></outputEntry>
        <outputEntry id="Rule_P09_NoShow_Fee"><text>100</text></outputEntry>
        <outputEntry id="Rule_P09_NoShow_Refund"><text>0</text></outputEntry>
        <outputEntry id="Rule_P09_NoShow_Reason"><text>"no-show not cancellable"</text></outputEntry>
      </rule>

      <rule id="Rule_P09_NonRefundable">
        <inputEntry id="Rule_P09_NonRefundable_Rate"><text>"non_refundable"</text></inputEntry>
        <inputEntry id="Rule_P09_NonRefundable_Hours"><text>-</text></inputEntry>
        <inputEntry id="Rule_P09_NonRefundable_NoShow"><text>false</text></inputEntry>
        <inputEntry id="Rule_P09_NonRefundable_Channel"><text>-</text></inputEntry>
        <outputEntry id="Rule_P09_NonRefundable_Allowed"><text>false</text></outputEntry>
        <outputEntry id="Rule_P09_NonRefundable_Fee"><text>100</text></outputEntry>
        <outputEntry id="Rule_P09_NonRefundable_Refund"><text>0</text></outputEntry>
        <outputEntry id="Rule_P09_NonRefundable_Reason"><text>"non-refundable plan"</text></outputEntry>
      </rule>

      <rule id="Rule_P09_PeakLate">
        <inputEntry id="Rule_P09_PeakLate_Rate"><text>"flex"</text></inputEntry>
        <inputEntry id="Rule_P09_PeakLate_Hours"><text>&lt;= 72</text></inputEntry>
        <inputEntry id="Rule_P09_PeakLate_NoShow"><text>false</text></inputEntry>
        <inputEntry id="Rule_P09_PeakLate_Channel"><text>"direct"</text></inputEntry>
        <outputEntry id="Rule_P09_PeakLate_Allowed"><text>true</text></outputEntry>
        <outputEntry id="Rule_P09_PeakLate_Fee"><text>80</text></outputEntry>
        <outputEntry id="Rule_P09_PeakLate_Refund"><text>20</text></outputEntry>
        <outputEntry id="Rule_P09_PeakLate_Reason"><text>"late peak-window cancellation"</text></outputEntry>
      </rule>

      <rule id="Rule_P09_EarlyFree">
        <inputEntry id="Rule_P09_EarlyFree_Rate"><text>-</text></inputEntry>
        <inputEntry id="Rule_P09_EarlyFree_Hours"><text>&gt; 168</text></inputEntry>
        <inputEntry id="Rule_P09_EarlyFree_NoShow"><text>false</text></inputEntry>
        <inputEntry id="Rule_P09_EarlyFree_Channel"><text>-</text></inputEntry>
        <outputEntry id="Rule_P09_EarlyFree_Allowed"><text>true</text></outputEntry>
        <outputEntry id="Rule_P09_EarlyFree_Fee"><text>0</text></outputEntry>
        <outputEntry id="Rule_P09_EarlyFree_Refund"><text>100</text></outputEntry>
        <outputEntry id="Rule_P09_EarlyFree_Reason"><text>"cancellation in free window"</text></outputEntry>
      </rule>

      <rule id="Rule_P09_DefaultPartial">
        <inputEntry id="Rule_P09_DefaultPartial_Rate"><text>-</text></inputEntry>
        <inputEntry id="Rule_P09_DefaultPartial_Hours"><text>-</text></inputEntry>
        <inputEntry id="Rule_P09_DefaultPartial_NoShow"><text>false</text></inputEntry>
        <inputEntry id="Rule_P09_DefaultPartial_Channel"><text>-</text></inputEntry>
        <outputEntry id="Rule_P09_DefaultPartial_Allowed"><text>true</text></outputEntry>
        <outputEntry id="Rule_P09_DefaultPartial_Fee"><text>50</text></outputEntry>
        <outputEntry id="Rule_P09_DefaultPartial_Refund"><text>50</text></outputEntry>
        <outputEntry id="Rule_P09_DefaultPartial_Reason"><text>"standard partial-fee cancellation"</text></outputEntry>
      </rule>
    </decisionTable>
  </decision>
</definitions>
