def __getRemoveVehicleTypeRequest(parkingIdentificationCode, id): vehiclerequest = VehicleTypeRequest(parkingIdentificationCode=parkingIdentificationCode, idFrequencyType=id) payload = Payload(vehiclerequest) request = Request(payload, buildMac(object2json(vehiclerequest)), 'HASH-PUBLIC-WEB') return request
def getRequest(user, password): loginRequest = LoginRequest(user, password) payload = Payload(loginRequest) request = Request(payload, buildMac(object2json(loginRequest)), 'HASH-PUBLIC-WEB') return request
def __getUpdateVehicleTypeRequest(parkingIdentificationCode, id, description): vehiclerequest = VehicleTypeRequest(parkingIdentificationCode, description, id) payload = Payload(vehiclerequest) request = Request(payload, buildMac(object2json(vehiclerequest)), 'HASH-PUBLIC-WEB') return request
def __getUpdateParkingRatesRequest(parkingIdentificationCode, id, vehicleTypeId, frequencyTypeId, amount): parkingRatesRequest = ParkingRatesRequest(parkingIdentificationCode, id, vehicleTypeId, frequencyTypeId, amount) payload = Payload(parkingRatesRequest) request = Request(payload, buildMac(object2json(parkingRatesRequest)), 'HASH-PUBLIC-WEB') return request
def __getSaveParkingRateRequest(parkingIdentificationCode, idVehicleSelected, idFrequencySelected, amount): parkingRateRequest = ParkingRatesRequest(parkingIdentificationCode, None, idVehicleSelected, idFrequencySelected, amount) payload = Payload(parkingRateRequest) request = Request(payload, buildMac(object2json(parkingRateRequest)), 'HASH-PUBLIC-WEB') return request
def __getFindParkingRatesByIdRequest(parkingIdentificationCode, idParkingRate): parkingRatesRequest = ParkingRatesRequest(parkingIdentificationCode=parkingIdentificationCode, idParkingRate=idParkingRate) payload = Payload(parkingRatesRequest) request = Request(payload, buildMac(object2json(parkingRatesRequest)), 'HASH-PUBLIC-WEB') return request
def __getUpdateFrequencyTypeRequest(parkingIdentificationCode, id, description, timeType, time, type, priority, combinablePreviousFrequency): frequencyRequest = FrequencyTypeRequest(parkingIdentificationCode, id, description, timeType, time, type, priority, combinablePreviousFrequency) payload = Payload(frequencyRequest) request = Request(payload, buildMac(object2json(frequencyRequest)), 'HASH-PUBLIC-WEB') return request
def __getAllVehicleTypeRequest(parkingIdentificationCode): vehiclerequest = VehicleTypeRequest(parkingIdentificationCode) payload = Payload(vehiclerequest) request = Request(payload, buildMac(object2json(vehiclerequest)), 'HASH-PUBLIC-WEB') return request
def __getFindFrequencyTypeByIdRequest(parkingIdentificationCode, idFrequencyType): frequencyRequest = FrequencyTypeRequest(parkingIdentificationCode=parkingIdentificationCode, idFrequencyType=idFrequencyType) payload = Payload(frequencyRequest) request = Request(payload, buildMac(object2json(frequencyRequest)), 'HASH-PUBLIC-WEB') return request
def __getAllFrequencyTypeRequest(parkingIdentificationCode): frequencyrequest = FrequencyTypeRequest(parkingIdentificationCode) payload = Payload(frequencyrequest) request = Request(payload, buildMac(object2json(frequencyrequest)), 'HASH-PUBLIC-WEB') return request
def createRequestToApplicationRest(): payload = Payload('') request = Request(payload, buildMac(object2json('')), 'HASH-PUBLIC-WEB') return encrypt.encrypted(object2json(request))