{
	"$schema": "http://json-schema.org/draft-07/schema",
	"type": "object",
	"title": "CommandProcessed schema",
	"description": "The commandprocessed schema comprises the command processed event related information",
	"required": [
		"specversion",
		"type",
		"source",
		"subject",
		"id",
		"data"
	],
	"properties": {
		"specversion": {
			"type": "string"
		},
		"type": {
			"type": "string"
		},
		"subject": {
			"type": "string"
		},
		"source": {
			"type": "string"
		},
		"id": {
			"type": "string"
		},
		"time": {
			"type": "string",
			"format": "yyyy-MM-dd'T'HH:mm:ss.SSSZ"
		},
		"correlationid": {
			"type": "string"
		},
		"serviceid": {
			"type": "string"
		},
		"channelid": {
			"type": "string"
		},
		"organizationid": {
			"type": "string"
		},
		"tenantid": {
			"type": "string"
		},
	        "businesskey": {
	            "type": "string"
	        },
	        "sequenceno": {
	            "type": "integer"
	        },
		"extension-mscontext": {
			"type": "object",
			"properties": {
				"authorization": {
					"type": "string"
				},
				"customfilterid": {
					"type": "string"
				},
				"operationinstanceid": {
					"type": "string"
				},
				"sequenceinstanceid": {
					"type": "string"
				},
				"priority": {
					"type": "integer"
				}
			}
		},
		"datacontenttype": {
			"type": "string"
		},
		"data": {
			"type": "object",
			"properties": {
				"commandId": {
					"type": "string"
				},
				"operationInstanceId": {
					"type": "string"
				},
				"sequenceInstanceId": {
					"type": "string"
				},
				"eventType": {
					"type": "string"
				},
				"status": {
					"type": "string"
				},
				"businessObject": {
					"type": "object",
					"properties": {
						"status": {
							"type": "integer"
						},
						"failureMessages": {
							"type": "array",
							"items": {}
						},
						"body": {
  "type" : "object",
  "id" : "urn:jsonschema:com:temenos:microservice:paymentorder:view:Account",
  "properties" : {
    "accountId" : {
      "type" : "string"
    },
    "accountName" : {
      "type" : "string"
    },
    "accountType" : {
      "type" : "string"
    },
    "branch" : {
      "type" : "string"
    }
  }
},
						"success": {
							"type": "boolean"
						}
					},
					"required": [
						"status",
						"failureMessages",
						"body",
						"success"
					]
				}
			},
			"required": [
				"commandId",
				"operationInstanceId",
				"sequenceInstanceId",
				"eventType",
				"status",
				"businessObject"
			]
		}
	}
}
