The travel policy rule. A rule is part of a rule class that defines one of the guards. Each rule will validate one property on a PNR. Chain them together to validate multiple properties of a PNR. Created by nick on 1/29/15.
| name | data type | description |
|---|---|---|
| type | TravelPolicyRuleType | |
| operator | TravelPolicyOperator | The comparator that the value should be applied against. |
| value | string | The value that the property in the PNR should be compared against. |
| unit | TravelPolicyUnit | The unit of measurement. Like $ or %. |
| airlines | array of AirVendor | Airlines that are available per this rule. |
| carClasses | array of CarClass | Car classes that are available per this rule. |
| carTypes | array of CarTypeCode | Car types that are available per this rule. |
| hotelProperties | array of HotelLocation | Hotel properties that are available per this rule. |
| classOfServiceLevels | array of ClassOfServiceLevel | The level of class of service that are available per this rule. |
| countries | array of Country | A set of countries that are available per this rule. |
| cities | array of City | A set of cities that are available per this rule. |
| hotelVendors | array of HotelVendor | A set of hotel chains that are available per this rule. |
| carVendors | array of CarVendor | A set of car rental chains that are available per this rule. |
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
{
"type" : {
"description" : "...",
"message" : "...",
"travelType" : {
"name" : "...",
"id" : 12345,
"version" : 12345,
"violations" : [ { }, { } ]
},
"valueType" : "...",
"operators" : [ {
"code" : "...",
"name" : "...",
"id" : 12345,
"version" : 12345,
"violations" : [ { }, { } ]
}, {
"code" : "...",
"name" : "...",
"id" : 12345,
"version" : 12345,
"violations" : [ { }, { } ]
} ],
"units" : [ {
"code" : "...",
"name" : "...",
"id" : 12345,
"version" : 12345,
"violations" : [ { }, { } ]
}, {
"code" : "...",
"name" : "...",
"id" : 12345,
"version" : 12345,
"violations" : [ { }, { } ]
} ],
"id" : 12345,
"version" : 12345,
"violations" : [ {
"propertyName" : "...",
"failureMessage" : "...",
"stackTrace" : "..."
}, {
"propertyName" : "...",
"failureMessage" : "...",
"stackTrace" : "..."
} ]
},
"operator" : {
"code" : "...",
"name" : "...",
"id" : 12345,
"version" : 12345,
"violations" : [ {
"propertyName" : "...",
"failureMessage" : "...",
"stackTrace" : "..."
}, {
"propertyName" : "...",
"failureMessage" : "...",
"stackTrace" : "..."
} ]
},
"value" : "...",
"unit" : {
"code" : "...",
"name" : "...",
"id" : 12345,
"version" : 12345,
"violations" : [ {
"propertyName" : "...",
"failureMessage" : "...",
"stackTrace" : "..."
}, {
"propertyName" : "...",
"failureMessage" : "...",
"stackTrace" : "..."
} ]
},
"airlines" : [ {
"airlineNumber" : 12345,
"checkinLink" : "...",
"baggageLink" : "...",
"alliance" : {
"sharesFrequentFlyerNumbers" : true,
"name" : "...",
"code" : "...",
"id" : 12345,
"version" : 12345,
"violations" : [ { }, { } ]
},
"lowCostCarrier" : true,
"longCode" : "...",
"manualTicketingOnly" : true,
"airTicketsUseOrigIssueDate" : true,
"mcoTicketsUseOrigIssueDate" : true,
"minDomesticValue" : 12345,
"minIntlValue" : 12345,
"position" : 12345,
"imageUrl" : "...",
"code" : "...",
"name" : "...",
"id" : 12345,
"version" : 12345,
"violations" : [ {
"propertyName" : "...",
"failureMessage" : "...",
"stackTrace" : "..."
}, {
"propertyName" : "...",
"failureMessage" : "...",
"stackTrace" : "..."
} ]
}, {
"airlineNumber" : 12345,
"checkinLink" : "...",
"baggageLink" : "...",
"alliance" : {
"sharesFrequentFlyerNumbers" : true,
"name" : "...",
"code" : "...",
"id" : 12345,
"version" : 12345,
"violations" : [ { }, { } ]
},
"lowCostCarrier" : true,
"longCode" : "...",
"manualTicketingOnly" : true,
"airTicketsUseOrigIssueDate" : true,
"mcoTicketsUseOrigIssueDate" : true,
"minDomesticValue" : 12345,
"minIntlValue" : 12345,
"position" : 12345,
"imageUrl" : "...",
"code" : "...",
"name" : "...",
"id" : 12345,
"version" : 12345,
"violations" : [ {
"propertyName" : "...",
"failureMessage" : "...",
"stackTrace" : "..."
}, {
"propertyName" : "...",
"failureMessage" : "...",
"stackTrace" : "..."
} ]
} ],
"carClasses" : [ {
"code" : "...",
"description" : "...",
"position" : 12345,
"size" : 12345,
"id" : 12345,
"version" : 12345,
"violations" : [ {
"propertyName" : "...",
"failureMessage" : "...",
"stackTrace" : "..."
}, {
"propertyName" : "...",
"failureMessage" : "...",
"stackTrace" : "..."
} ]
}, {
"code" : "...",
"description" : "...",
"position" : 12345,
"size" : 12345,
"id" : 12345,
"version" : 12345,
"violations" : [ {
"propertyName" : "...",
"failureMessage" : "...",
"stackTrace" : "..."
}, {
"propertyName" : "...",
"failureMessage" : "...",
"stackTrace" : "..."
} ]
} ],
"carTypes" : [ {
"code" : "...",
"description" : "...",
"position" : 12345,
"size" : 12345,
"id" : 12345,
"version" : 12345,
"violations" : [ {
"propertyName" : "...",
"failureMessage" : "...",
"stackTrace" : "..."
}, {
"propertyName" : "...",
"failureMessage" : "...",
"stackTrace" : "..."
} ]
}, {
"code" : "...",
"description" : "...",
"position" : 12345,
"size" : 12345,
"id" : 12345,
"version" : 12345,
"violations" : [ {
"propertyName" : "...",
"failureMessage" : "...",
"stackTrace" : "..."
}, {
"propertyName" : "...",
"failureMessage" : "...",
"stackTrace" : "..."
} ]
} ],
"hotelProperties" : [ {
"address1" : "...",
"address2" : "...",
"phone1" : "...",
"phone2" : "...",
"fax" : "...",
"zip" : "...",
"city" : {
"code" : "...",
"countryCode" : "...",
"latitude" : 12345.0,
"longitude" : 12345.0,
"name" : "...",
"stateOrCountry" : "...",
"airportName" : "...",
"region" : { },
"timeZone" : { },
"retentionOnly" : true,
"position" : 12345,
"unique" : true,
"alias" : true,
"id" : 12345,
"version" : 12345,
"violations" : [ { }, { } ]
},
"vendor" : {
"longCode" : "...",
"commissionRate" : 12345.0,
"family" : { },
"position" : 12345,
"code" : "...",
"name" : "...",
"id" : 12345,
"version" : 12345,
"violations" : [ { }, { } ]
},
"latitude" : 12345.0,
"sertifiCode" : "...",
"googlePlaceId" : "...",
"longitude" : 12345.0,
"propertyName" : "...",
"propertyCodes" : [ {
"gds" : { },
"code" : "...",
"id" : 12345,
"version" : 12345,
"violations" : [ { }, { } ]
}, {
"gds" : { },
"code" : "...",
"id" : 12345,
"version" : 12345,
"violations" : [ { }, { } ]
} ],
"id" : 12345,
"version" : 12345,
"violations" : [ {
"propertyName" : "...",
"failureMessage" : "...",
"stackTrace" : "..."
}, {
"propertyName" : "...",
"failureMessage" : "...",
"stackTrace" : "..."
} ]
}, {
"address1" : "...",
"address2" : "...",
"phone1" : "...",
"phone2" : "...",
"fax" : "...",
"zip" : "...",
"city" : {
"code" : "...",
"countryCode" : "...",
"latitude" : 12345.0,
"longitude" : 12345.0,
"name" : "...",
"stateOrCountry" : "...",
"airportName" : "...",
"region" : { },
"timeZone" : { },
"retentionOnly" : true,
"position" : 12345,
"unique" : true,
"alias" : true,
"id" : 12345,
"version" : 12345,
"violations" : [ { }, { } ]
},
"vendor" : {
"longCode" : "...",
"commissionRate" : 12345.0,
"family" : { },
"position" : 12345,
"code" : "...",
"name" : "...",
"id" : 12345,
"version" : 12345,
"violations" : [ { }, { } ]
},
"latitude" : 12345.0,
"sertifiCode" : "...",
"googlePlaceId" : "...",
"longitude" : 12345.0,
"propertyName" : "...",
"propertyCodes" : [ {
"gds" : { },
"code" : "...",
"id" : 12345,
"version" : 12345,
"violations" : [ { }, { } ]
}, {
"gds" : { },
"code" : "...",
"id" : 12345,
"version" : 12345,
"violations" : [ { }, { } ]
} ],
"id" : 12345,
"version" : 12345,
"violations" : [ {
"propertyName" : "...",
"failureMessage" : "...",
"stackTrace" : "..."
}, {
"propertyName" : "...",
"failureMessage" : "...",
"stackTrace" : "..."
} ]
} ],
"classOfServiceLevels" : [ {
"name" : "...",
"code" : "...",
"value" : 12345,
"id" : 12345,
"version" : 12345,
"violations" : [ {
"propertyName" : "...",
"failureMessage" : "...",
"stackTrace" : "..."
}, {
"propertyName" : "...",
"failureMessage" : "...",
"stackTrace" : "..."
} ]
}, {
"name" : "...",
"code" : "...",
"value" : 12345,
"id" : 12345,
"version" : 12345,
"violations" : [ {
"propertyName" : "...",
"failureMessage" : "...",
"stackTrace" : "..."
}, {
"propertyName" : "...",
"failureMessage" : "...",
"stackTrace" : "..."
} ]
} ],
"countries" : [ {
"name" : "...",
"code" : "...",
"codeAlt" : "...",
"phoneCode" : 12345,
"position" : 12345,
"id" : 12345,
"version" : 12345,
"violations" : [ {
"propertyName" : "...",
"failureMessage" : "...",
"stackTrace" : "..."
}, {
"propertyName" : "...",
"failureMessage" : "...",
"stackTrace" : "..."
} ]
}, {
"name" : "...",
"code" : "...",
"codeAlt" : "...",
"phoneCode" : 12345,
"position" : 12345,
"id" : 12345,
"version" : 12345,
"violations" : [ {
"propertyName" : "...",
"failureMessage" : "...",
"stackTrace" : "..."
}, {
"propertyName" : "...",
"failureMessage" : "...",
"stackTrace" : "..."
} ]
} ],
"cities" : [ {
"code" : "...",
"countryCode" : "...",
"latitude" : 12345.0,
"longitude" : 12345.0,
"name" : "...",
"stateOrCountry" : "...",
"airportName" : "...",
"region" : {
"name" : "...",
"code" : "...",
"country" : { },
"position" : 12345,
"id" : 12345,
"version" : 12345,
"violations" : [ { }, { } ]
},
"timeZone" : {
"name" : "...",
"offset" : 12345.0,
"daylightSavingsOffset" : 12345.0,
"id" : 12345,
"version" : 12345,
"violations" : [ { }, { } ]
},
"retentionOnly" : true,
"position" : 12345,
"unique" : true,
"alias" : true,
"id" : 12345,
"version" : 12345,
"violations" : [ {
"propertyName" : "...",
"failureMessage" : "...",
"stackTrace" : "..."
}, {
"propertyName" : "...",
"failureMessage" : "...",
"stackTrace" : "..."
} ]
}, {
"code" : "...",
"countryCode" : "...",
"latitude" : 12345.0,
"longitude" : 12345.0,
"name" : "...",
"stateOrCountry" : "...",
"airportName" : "...",
"region" : {
"name" : "...",
"code" : "...",
"country" : { },
"position" : 12345,
"id" : 12345,
"version" : 12345,
"violations" : [ { }, { } ]
},
"timeZone" : {
"name" : "...",
"offset" : 12345.0,
"daylightSavingsOffset" : 12345.0,
"id" : 12345,
"version" : 12345,
"violations" : [ { }, { } ]
},
"retentionOnly" : true,
"position" : 12345,
"unique" : true,
"alias" : true,
"id" : 12345,
"version" : 12345,
"violations" : [ {
"propertyName" : "...",
"failureMessage" : "...",
"stackTrace" : "..."
}, {
"propertyName" : "...",
"failureMessage" : "...",
"stackTrace" : "..."
} ]
} ],
"hotelVendors" : [ {
"longCode" : "...",
"commissionRate" : 12345.0,
"family" : {
"name" : "...",
"code" : "...",
"id" : 12345,
"version" : 12345,
"violations" : [ { }, { } ]
},
"position" : 12345,
"code" : "...",
"name" : "...",
"id" : 12345,
"version" : 12345,
"violations" : [ {
"propertyName" : "...",
"failureMessage" : "...",
"stackTrace" : "..."
}, {
"propertyName" : "...",
"failureMessage" : "...",
"stackTrace" : "..."
} ]
}, {
"longCode" : "...",
"commissionRate" : 12345.0,
"family" : {
"name" : "...",
"code" : "...",
"id" : 12345,
"version" : 12345,
"violations" : [ { }, { } ]
},
"position" : 12345,
"code" : "...",
"name" : "...",
"id" : 12345,
"version" : 12345,
"violations" : [ {
"propertyName" : "...",
"failureMessage" : "...",
"stackTrace" : "..."
}, {
"propertyName" : "...",
"failureMessage" : "...",
"stackTrace" : "..."
} ]
} ],
"carVendors" : [ {
"longCode" : "...",
"commissionRate" : 12345.0,
"position" : 12345,
"code" : "...",
"name" : "...",
"id" : 12345,
"version" : 12345,
"violations" : [ {
"propertyName" : "...",
"failureMessage" : "...",
"stackTrace" : "..."
}, {
"propertyName" : "...",
"failureMessage" : "...",
"stackTrace" : "..."
} ]
}, {
"longCode" : "...",
"commissionRate" : 12345.0,
"position" : 12345,
"code" : "...",
"name" : "...",
"id" : 12345,
"version" : 12345,
"violations" : [ {
"propertyName" : "...",
"failureMessage" : "...",
"stackTrace" : "..."
}, {
"propertyName" : "...",
"failureMessage" : "...",
"stackTrace" : "..."
} ]
} ],
"id" : 12345,
"version" : 12345,
"violations" : [ {
"propertyName" : "...",
"failureMessage" : "...",
"stackTrace" : "..."
}, {
"propertyName" : "...",
"failureMessage" : "...",
"stackTrace" : "..."
} ]
}