{
    "$schema" : "http://json-schema.org/draft-04/schema#",
    "title" : "Redeem",
    "type" : "object",
    "additionalProperties" : false,
    "description" : "TAnalytics-v2 .. Log when a coupon is redeemed successfully",
    "properties" : {
        "log_context" : {
            "$ref" : "/resources/schema/analytics/client/v2/LogContext.json",
            "description" : "Required Log Context Reference"
        },
	"event_name":{
	    "type": "string",
	    "enum": ["REDEEM"]		
	},
	"schema_definition":{
	    "type": "string",
	    "enum": ["Redeem"]
	},
        "merchant_id" : {
            "type" : "string",
            "description" : "Required identifier of the merchant offering the coupon"
        },
        "business_name" : {
            "type" : "string",
            "description" : "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" : "Coupon ID of the coupon DETAIL that was selected"
        },
        "coupon_detail_id" : {
            "type" : "string",
            "description" : "The LogID of the CouponDetails event that led to the Redeem"
        },
        "status" : {
            "$ref" : "/resources/schema/analytics/client/v2/StatusType.json",
            "description" : "Successfully redeemed or not"
        },
        "search_id" : {
            "type" : "string",
            "description" : "The log ID of SEARCH event that led to the click on the coupon"
        }
    },
    "required" : [
        "log_context",
        "event_name",
        "schema_definition",
        "merchant_id",
        "business_name",
        "dest_lat",
        "dest_lon",
        "coupon_id",
        "coupon_detail_id",
        "status"
    ]
}