{
	"$schema":"http://json-schema.org/draft-04/schema#",
	"title":"ClickRedeem",
	"type":"object",
	"additionalProperties":false,
	"description":"Analytics-v2 .. Click Redeem object",
	"properties":{
		"log_context":{
			"$ref":"/resources/schema/analytics/client/v2/LogContext.json",
			"description":"Required Log Context Reference"
		},
		"event_name":{
			"type": "string",
			"enum": ["CLICK_REDEEM"]		
		},
		"schema_definition":{
			"type": "string",
			"enum": ["ClickRedeem"]
		},
		"action":{
			"$ref":"/resources/schema/analytics/client/v2/ClickActionType.json",
			"description":"Required .. User clicks on redeem coupon - log Click. Log Select or Cancel depending on user choice of RedeemNow or Cancel the following popup"
		},
        	"merchant_id" : {
            		"type" : "string",
            		"description" : "Required .. identifier of the merchant offering the coupon"
        	},
        	"business_name" : {
            		"type" : "string",
            		"description" : "Required ..The name of the business offering the coupon"
        	},
		"dest_lat":{
	    		"type":"number",
            		"description":"Required .. Latitude of destination."
		},
		"dest_lon":{
            		"type":"number",
            		"description":"Required .. Longitude of destination."
		},
		"coupon_id":{
			"type":"string",
			"description":"Required .. CouponID of Coupon that that was clicked to redeem."
		},
		"distance":{
			"type":"number",
			"description":"Required .. Calculated distance."
		},
		"coupon_detail_id":{
			"type":"string",
			"description":"Required .. LogID of CouponDetails that led to the click on redeem"
		},
		"status":{
			"$ref":"/resources/schema/analytics/client/v2/StatusType.json",
			"description":"Required .. Whether successfully redeemed or not"
		},
		"caused_by":{
			"type":"string",
			"description":"The reason/response code for cancel/fail of redeem. Could be due to being too far from business to redeem"
		},
        	"search_id" : {
            		"type" : "string",
            		"description" : "Log ID of the search event that led to the click on redeem"
        	}
		
	},
	"required":[
		"log_context",
		"event_name",
		"schema_definition",
		"action",
		"merchant_id",
		"business_name",
		"dest_lat",
		"dest_lon",
		"coupon_id",
		"distance",
		"coupon_detail_id"
	]
}