{
	"$schema": "http://json-schema.org/draft-04/schema#",
	"description": "JSON 7.0 cancellation common types definitions",
	"type": "object",
	"additionalProperties": false,
	"definitions": {
		"cancelledTourType": {
			"type": "object",
			"properties": {
				"bookingReference": {
					"description": "bookingReference of this tour",
					"$ref": "commonTypes.json#/definitions/xs:string",
					"additionalProperties": false
				},
				"cancellationReference": {
					"description": "Unique reference of the cancellation transaction, if the reservation has been cancelled.",
					"$ref": "commonTypes.json#/definitions/xs:string"
				},
				"currencyCode": {
					"description": "Currency used for this tour. All amount related to this tour are based on this currency",
					"$ref": "commonTypes.json#/definitions/currencyCodeType"
				},
				"paymentInfo": {
					"$ref": "bookingCommonTypes.json#/definitions/paymentResponseType",
					"description": "Cancellation charge if cancelled after the cancellation deadline"
				},
				"roomCancellationChargeDetails": {
					"description": "Full details and the cancellation charge along with the how the cancellation charge is calculated per Night.",
					"type": "array",
					"minItems": 1,
					"items": {
						"$ref": "#/definitions/cancellationChargeDetail"
					},
					"additionalProperties": false
				},
				"status": {
					"description": "Indicates the status of the transaction.",
					"$ref": "commonTypes.json#/definitions/TransactionStatusType",
					"additionalProperties": false
				},
				"tourReference": {
					"description": "The unique reservation reference of the item for which cancellation was requested",
					"type": "object",
					"$ref": "bookingCommonTypes.json#/definitions/tourReferenceType",
					"additionalProperties": false
				},
				"tourTotalCancellationCharge": {
					"$ref": "commonTypes.json#/definitions/xs:decimal",
					"additionalProperties": false
				}
			},
			"required": [
				"bookingReference",
				"currencyCode",
				"status",
				"tourReference",
				"tourTotalCancellationCharge"
			],
			"additionalProperties": false
		},
		"cancellationChargeDetail": {
			"additionalProperties": false,
			"description": "Cancellation charge for each segments in the item",
			"properties": {
				"roomNo": {
					"$ref": "commonTypes.json#/definitions/xs:positiveInteger"
				},
				"roomTypeCode": {
					"$ref": "commonTypes.json#/definitions/subproductCodeType"
				},
				"cancellationPolicy": {
					"additionalProperties": false,
					"description": "Cancellation Policy that is applied to calculate the cancellation charge",
					"properties": {
						"appliesFrom": {
							"additionalProperties": false,
							"$ref": "commonTypes.json#/definitions/xs:dateTime"
						},
						"appliesTo": {
							"additionalProperties": false,
							"$ref": "commonTypes.json#/definitions/xs:dateTime"
						},
						"cancellationCharge": {
							"$ref": "commonTypes.json#/definitions/cancellationCharge"
						},
						"fullStay": {
							"additionalProperties": false,
							"description": "Shows either cancellation charge percent should be applied to the whole stay or to the first night only",
							"$ref": "commonTypes.json#/definitions/xs:boolean"
						}
					},
					"required": [
						"appliesFrom",
						"cancellationCharge",
						"fullStay"
					],
					"type": "object",
					"javaType": "uk.co.miki.eBiz.msi.service.json70.schema.DetailCancellationPolicy"
				},
				"roomTotalCancellationCharge": {
					"additionalProperties": false,
					"description": "The charge details for this particular segment",
					"$ref": "commonTypes.json#/definitions/xs:decimal"
				}
			},
			"required": [
				"roomTotalCancellationCharge",
				"roomNo",
				"roomTypeCode"
			],
			"type": "object"
		}
	}
}