예제 #1
0
def testUpdateContract ():

	contractJSON = {
	  "APIName" : "Credit Tracker Credit View (Internal)",
	  "APPName" : "CC-Targeted-Products-Offer",
	  "APIVersionName" : "",
	  "APPVersionName" : "",
	  "ContractID" : "",
	  "Environment" : "",
	  "ContractScope" : {
	    "Restricted" : "true",
	    "LicenseID" : ["0a1a4e2b-14c6-413f-8975-4127e54922ac.enterpriseapi"]
	  },
	  "StateAction" : { 
	    "ActionName":"", 
           "Comments":""
         }
	}
	#contractDict["licenseArray"] = ["d1e473d7-88a3-482e-90a8-3ac895d40422.enterpriseapi"]

	resultjson = cm.requestContract (contractJSON)
	
	print ("Contract Id = "+ resultjson["ContractID"])

	return
예제 #2
0
def testCreateContract ():

	contractJSON = {
	  "APIName" : "Credit Tracker Credit View (Internal)",
	  "APPName" : "CC-Targeted-Products-Offer",
	  "APIVersionName" : "",
	  "APPVersionName" : "",
	  "ContractID" : "",
	  "Environment" : "Sandbox",
	  "ContractScope" : {
	    "Restricted" : "false",
	    "LicenseID" : []
	  },
	  "StateAction" : { 
	    "ActionName":"", 
           "Comments":""
         }
	}

	resultjson = cm.requestContract (contractJSON)	
	print ("Contract Id = "+ resultjson["ContractID"])

	return