TravelPolicyRuleType Data Type

The travel policy rule type defines what properties the rule evaluates when checking against the value/operator/unit of the itinerary. Created by nick on 1/29/15.

Properties
name data type description
description string A short description of what the rule is for.
message string The default error message if the rule is violated.
travelType ReservationType The type of travel that this rule checks.
valueType string The expected value type for this rule.
operators array of TravelPolicyOperator The available operators for this rule type.
units array of TravelPolicyUnit The available units for this rule type.
Properties inherited from BaseHibernateEntity
id number The unique internal ID of the object.
version number For internal use only. This is the serialization recorder for optimistic locking of several objects between sessions.
Properties inherited from BaseEntity
violations array of SimpleViolation A list of constraint violations, if any, that this object has.

Example

{
  "description" : "...",
  "message" : "...",
  "travelType" : {
    "name" : "...",
    "id" : 12345,
    "version" : 12345,
    "violations" : [ {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    }, {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    } ]
  },
  "valueType" : "...",
  "operators" : [ {
    "code" : "...",
    "name" : "...",
    "id" : 12345,
    "version" : 12345,
    "violations" : [ {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    }, {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    } ]
  }, {
    "code" : "...",
    "name" : "...",
    "id" : 12345,
    "version" : 12345,
    "violations" : [ {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    }, {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    } ]
  } ],
  "units" : [ {
    "code" : "...",
    "name" : "...",
    "id" : 12345,
    "version" : 12345,
    "violations" : [ {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    }, {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    } ]
  }, {
    "code" : "...",
    "name" : "...",
    "id" : 12345,
    "version" : 12345,
    "violations" : [ {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    }, {
      "propertyName" : "...",
      "failureMessage" : "...",
      "stackTrace" : "..."
    } ]
  } ],
  "id" : 12345,
  "version" : 12345,
  "violations" : [ {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  }, {
    "propertyName" : "...",
    "failureMessage" : "...",
    "stackTrace" : "..."
  } ]
}