def generate_appropriate_request(class_type, dct): if class_type not in dct.keys(): return False, InvalidClass(status=400, message=Result.language.NO_CLASS_PATH, params={Keys.USER_TYPE: class_type}) type_ = dct[class_type] return create_class_dynamically(logger, type_['module'], type_['class'], class_type)
def generate_appropriate_request(class_type): if class_type not in BaseOrderProcessStatusesRequest.dct: # return False, InvalidClass(status=400, message=Result.language.NO_CLASS_PATH, # params={Keys.REQUEST_TYPE: class_type}) return False, {Keys.USER_TYPE: class_type} type_ = BaseOrderProcessStatusesRequest.dct[class_type] return create_class_dynamically(logger, type_['module'], type_['class'], class_type)
def generate_appropriate_controller(self): type_ = BaseOrderProcessStatusesController.dct[self.type_] return create_class_dynamically(logger, type_['module'], type_['class'], self.type_)
def generate_appropriate_controller(self): type_ = JobBaseController.dct[self.type_] return create_class_dynamically(logger, type_['module'], type_['class'], self.type_)
def generate_appropriate_controller(self): reusult = None type_ = BasePaymentOperationController.dct[self.type_] return create_class_dynamically(logger, type_['module'], type_['class'], self.type_)