예제 #1
0
    def delete_photo(self):
        try:
            from .Handler import EntityAPIHandler
        except ImportError:
            from Handler import EntityAPIHandler

        return EntityAPIHandler.get_instance(self).delete_photo()
예제 #2
0
 def get_record(self, entityID):
     try:
         from .Handler import EntityAPIHandler
     except ImportError:
         from Handler import EntityAPIHandler
     record = ZCRMRecord.get_instance(self.api_name, entityID)
     return EntityAPIHandler.get_instance(record).get_record()
예제 #3
0
 def upload_photo(self, file_path):
     if file_path is None:
         from Utility import CommonUtil
         CommonUtil.raise_exception('Upload_Photo',
                                    "file path must be given",
                                    'FILEPATH NOT PROVIDED', "FILEPATH")
     from Handler import EntityAPIHandler
     return EntityAPIHandler.get_instance(self).upload_photo(file_path)
예제 #4
0
 def delete(self):
     if self.entity_id is None:
         from Utility import CommonUtil
         CommonUtil.raise_exception('Record_Delete',
                                    "id should be set for the record",
                                    'ID DOES NOT PROVIDED', "ID")
     from Handler import EntityAPIHandler
     return EntityAPIHandler.get_instance(self).delete_record()
예제 #5
0
 def create(self):
     if self.entity_id is not None:
         from Utility import CommonUtil
         CommonUtil.raise_exception('Record_Create',
                                    "id should not be set for the record",
                                    'ID PROVIDED', "ID")
     from Handler import EntityAPIHandler
     return EntityAPIHandler.get_instance(self).create_record()
예제 #6
0
 def convert(self, potential_record=None, assign_to_user=None):
     if self.entity_id is None:
         from Utility import CommonUtil
         CommonUtil.raise_exception('Convert_Record',
                                    "id should be set for the record",
                                    'ID DOES NOT PROVIDED', "ID")
     from Handler import EntityAPIHandler
     return EntityAPIHandler.get_instance(self).convert_record(
         potential_record, assign_to_user)
예제 #7
0
 def update(self):
     if self.entity_id is None:
         try:
             from .Utility import CommonUtil
         except ImportError:
             from Utility import CommonUtil
         CommonUtil.raise_exception('Record_Update',
                                    "id should be set for the record",
                                    'ID DOES NOT PROVIDED', "ID")
     try:
         from .Handler import EntityAPIHandler
     except ImportError:
         from Handler import EntityAPIHandler
     return EntityAPIHandler.get_instance(self).update_record()
예제 #8
0
 def delete_photo(self):
     from Handler import EntityAPIHandler
     return EntityAPIHandler.get_instance(self).delete_photo()
예제 #9
0
 def download_photo(self):
     from Handler import EntityAPIHandler
     return EntityAPIHandler.get_instance(self).download_photo()