{
	"$schema":"http://json-schema.org/draft-04/schema#",
	"title":"PlanUpgrade",
	"type":"object",
	"additionalProperties":false,
	"description":"TAnalytics-v2 .. User upgrades to a promo or paid version of the app",
	"properties":{
		"log_context":{
			"$ref":"/resources/schema/analytics/client/v2/LogContext.json",
			"description":"Required Log Context Reference"
		},
		"type":{
			"$ref":"/resources/schema/analytics/client/v2/AccountType.json",
			"description":"Whether upgrade was done to promo or paid"
		},
		"event_name":{
			"type":"string",
			"enum":[
				"PLAN_UPGRADE"
			]
			
		},
		"schema_definition":{
			"type":"string",
			"enum":[
				"PlanUpgrade"
			]
			
		},
		"new_offer_code":{
			"type":"string",
			"description":"Required The offer code of the plan being upgraded to"
		},
		"receipt_id":{
			"type":"string",
			"description":"Receipt ID when user purchases a subscription through the carrier"
		},
		"price":{
			"type":"number",
			"description":"Optional Price to upgrade"
		},
		"renewal_cycle":{
			"$ref":"/resources/schema/analytics/client/v2/PlanRenewalCycleType.json",
			"description":"Optional Renewal cycle of the plan"
		},
		"start_time":{
			"type":"number",
			"description":"Required Start time of the offer"
		},
		"expiry_time":{
			"type":"number",
			"description":"Optional Time when the offer expires"
		},
		"sub_external_id":{
			"type":"string",
			"description":"Optional Subscriber's external ID from carrier, if and when available"
		}
		
	},
	"required":[
		"log_context",
		"event_name",
		"schema_definition",
		"type",
		"new_offer_code",
		"start_time"
	]
}