Esempio n. 1
0
    def updatePrefix(self,request):
	request.needAuthType(request.ADMIN)
	request.getAuthNameObj().canDo("CHANGE VOIP TARIFF")
    	request.checkArgs("tariff_name","prefix_id","prefix_code","prefix_name","cpm","free_seconds","min_duration","round_to")
	tariff_main.getActionsManager().updatePrefix(request["tariff_name"],
						  to_int(request["prefix_id"],"prefix id"),
					          request["prefix_code"],
						  request["prefix_name"],
						  to_float(request["cpm"],"cpm"),
						  to_int(request["free_seconds"],"free seconds"),
						  to_int(request["min_duration"],"min duration"),
						  to_int(request["round_to"],"round to"))
Esempio n. 2
0
 def updatePrefix(self,request):
     request.needAuthType(request.ADMIN)
     request.getAuthNameObj().canDo("CHANGE VOIP TARIFF")
     request.checkArgs("tariff_name","prefix_id","prefix_code","prefix_name","cpm","free_seconds","min_duration","round_to","min_chargable_duration")
     tariff_main.getActionsManager().updatePrefix(request["tariff_name"],
                                               to_int(request["prefix_id"],"prefix id"),
                                               request["prefix_code"],
                                               request["prefix_name"],
                                               to_float(request["cpm"],"cpm"),
                                               to_int(request["free_seconds"],"free seconds"),
                                               to_int(request["min_duration"],"min duration"),
                                               to_int(request["round_to"],"round to"),
                                               to_int(request["min_chargable_duration"],"min chargable duration"))
Esempio n. 3
0
    def addPrefix(self,request):
	request.needAuthType(request.ADMIN)
	request.getAuthNameObj().canDo("CHANGE VOIP TARIFF")
    	request.checkArgs("tariff_name","prefix_codes","prefix_names","cpms","free_seconds","min_durations","round_tos")
	return tariff_main.getActionsManager().addPrefix(request["tariff_name"],
					          request.fixList("prefix_codes"),
						  request.fixList("prefix_names"),
						  request.fixList("cpms"),
						  request.fixList("free_seconds"),
						  request.fixList("min_durations"),
						  request.fixList("round_tos"))
Esempio n. 4
0
 def addPrefix(self,request):
     request.needAuthType(request.ADMIN)
     request.getAuthNameObj().canDo("CHANGE VOIP TARIFF")
     request.checkArgs("tariff_name","prefix_codes","prefix_names","cpms","free_seconds","min_durations","round_tos","min_chargable_durations")
     return tariff_main.getActionsManager().addPrefix(request["tariff_name"],
                                               request.fixList("prefix_codes"),
                                               request.fixList("prefix_names"),
                                               request.fixList("cpms"),
                                               request.fixList("free_seconds"),
                                               request.fixList("min_durations"),
                                               request.fixList("round_tos"),
                                               request.fixList("min_chargable_durations"))
Esempio n. 5
0
    def deletePrefix(self,request):
	request.needAuthType(request.ADMIN)
	request.getAuthNameObj().canDo("CHANGE VOIP TARIFF")
    	request.checkArgs("tariff_name","prefix_code")
	tariff_main.getActionsManager().deletePrefix(request["tariff_name"],multi_strs.MultiStr(request["prefix_code"]))
Esempio n. 6
0
    def deleteTariff(self,request):
	request.needAuthType(request.ADMIN)
	request.getAuthNameObj().canDo("CHANGE VOIP TARIFF")
    	request.checkArgs("tariff_name")
	tariff_main.getActionsManager().updateTariff(request["tariff_name"])
Esempio n. 7
0
    def updateTariff(self,request):
	request.needAuthType(request.ADMIN)
	request.getAuthNameObj().canDo("CHANGE VOIP TARIFF")
    	request.checkArgs("tariff_id","tariff_name","comment")
	tariff_main.getActionsManager().updateTariff(to_int(request["tariff_id"],"Tariff id"),request["tariff_name"],request["comment"])
Esempio n. 8
0
    def addNewTariff(self,request):
	request.needAuthType(request.ADMIN)
	request.getAuthNameObj().canDo("CHANGE VOIP TARIFF")
    	request.checkArgs("tariff_name","comment")
	tariff_id=tariff_main.getActionsManager().addNewTariff(request["tariff_name"],request["comment"])
	return tariff_id
Esempio n. 9
0
 def deletePrefix(self,request):
     request.needAuthType(request.ADMIN)
     request.getAuthNameObj().canDo("CHANGE VOIP TARIFF")
     request.checkArgs("tariff_name","prefix_code")
     tariff_main.getActionsManager().deletePrefix(request["tariff_name"],multi_strs.MultiStr(request["prefix_code"]))
Esempio n. 10
0
 def deleteTariff(self,request):
     request.needAuthType(request.ADMIN)
     request.getAuthNameObj().canDo("CHANGE VOIP TARIFF")
     request.checkArgs("tariff_name")
     tariff_main.getActionsManager().deleteTariff(request["tariff_name"])
Esempio n. 11
0
 def updateTariff(self,request):
     request.needAuthType(request.ADMIN)
     request.getAuthNameObj().canDo("CHANGE VOIP TARIFF")
     request.checkArgs("tariff_id","tariff_name","comment")
     tariff_main.getActionsManager().updateTariff(to_int(request["tariff_id"],"Tariff id"),request["tariff_name"],request["comment"])
Esempio n. 12
0
 def addNewTariff(self,request):
     request.needAuthType(request.ADMIN)
     request.getAuthNameObj().canDo("CHANGE VOIP TARIFF")
     request.checkArgs("tariff_name","comment")
     tariff_id=tariff_main.getActionsManager().addNewTariff(request["tariff_name"],request["comment"])
     return tariff_id