code
stringlengths
501
5.19M
package
stringlengths
2
81
path
stringlengths
9
304
filename
stringlengths
4
145
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants from zcrmsdk.src.com.zoho.crm.api.record.response_handler import ResponseHandler except Exception: from ..exception import SDKException from ..util import Constants from .response_handler import ResponseHandler class ResponseWrapper(ResponseHandler): def __init__(self): """Creates an instance of ResponseWrapper""" super().__init__() self.__data = None self.__info = None self.__key_modified = dict() def get_data(self): """ The method to get the data Returns: list: An instance of list """ return self.__data def set_data(self, data): """ The method to set the value to data Parameters: data (list) : An instance of list """ if data is not None and not isinstance(data, list): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: data EXPECTED TYPE: list', None, None) self.__data = data self.__key_modified['data'] = 1 def get_info(self): """ The method to get the info Returns: Info: An instance of Info """ return self.__info def set_info(self, info): """ The method to set the value to info Parameters: info (Info) : An instance of Info """ try: from zcrmsdk.src.com.zoho.crm.api.record.info import Info except Exception: from .info import Info if info is not None and not isinstance(info, Info): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: info EXPECTED TYPE: Info', None, None) self.__info = info self.__key_modified['info'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/record/response_wrapper.py
response_wrapper.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants from zcrmsdk.src.com.zoho.crm.api.record.deleted_records_handler import DeletedRecordsHandler except Exception: from ..exception import SDKException from ..util import Constants from .deleted_records_handler import DeletedRecordsHandler class DeletedRecordsWrapper(DeletedRecordsHandler): def __init__(self): """Creates an instance of DeletedRecordsWrapper""" super().__init__() self.__data = None self.__info = None self.__key_modified = dict() def get_data(self): """ The method to get the data Returns: list: An instance of list """ return self.__data def set_data(self, data): """ The method to set the value to data Parameters: data (list) : An instance of list """ if data is not None and not isinstance(data, list): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: data EXPECTED TYPE: list', None, None) self.__data = data self.__key_modified['data'] = 1 def get_info(self): """ The method to get the info Returns: Info: An instance of Info """ return self.__info def set_info(self, info): """ The method to set the value to info Parameters: info (Info) : An instance of Info """ try: from zcrmsdk.src.com.zoho.crm.api.record.info import Info except Exception: from .info import Info if info is not None and not isinstance(info, Info): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: info EXPECTED TYPE: Info', None, None) self.__info = info self.__key_modified['info'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/record/deleted_records_wrapper.py
deleted_records_wrapper.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants except Exception: from ..exception import SDKException from ..util import Constants class CarryOverTags(object): def __init__(self): """Creates an instance of CarryOverTags""" self.__contacts = None self.__accounts = None self.__deals = None self.__key_modified = dict() def get_contacts(self): """ The method to get the contacts Returns: list: An instance of list """ return self.__contacts def set_contacts(self, contacts): """ The method to set the value to contacts Parameters: contacts (list) : An instance of list """ if contacts is not None and not isinstance(contacts, list): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: contacts EXPECTED TYPE: list', None, None) self.__contacts = contacts self.__key_modified['Contacts'] = 1 def get_accounts(self): """ The method to get the accounts Returns: list: An instance of list """ return self.__accounts def set_accounts(self, accounts): """ The method to set the value to accounts Parameters: accounts (list) : An instance of list """ if accounts is not None and not isinstance(accounts, list): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: accounts EXPECTED TYPE: list', None, None) self.__accounts = accounts self.__key_modified['Accounts'] = 1 def get_deals(self): """ The method to get the deals Returns: list: An instance of list """ return self.__deals def set_deals(self, deals): """ The method to set the value to deals Parameters: deals (list) : An instance of list """ if deals is not None and not isinstance(deals, list): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: deals EXPECTED TYPE: list', None, None) self.__deals = deals self.__key_modified['Deals'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/record/carry_over_tags.py
carry_over_tags.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants except Exception: from ..exception import SDKException from ..util import Constants class LineTax(object): def __init__(self): """Creates an instance of LineTax""" self.__percentage = None self.__name = None self.__id = None self.__value = None self.__display_name = None self.__key_modified = dict() def get_percentage(self): """ The method to get the percentage Returns: float: A float representing the percentage """ return self.__percentage def set_percentage(self, percentage): """ The method to set the value to percentage Parameters: percentage (float) : A float representing the percentage """ if percentage is not None and not isinstance(percentage, float): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: percentage EXPECTED TYPE: float', None, None) self.__percentage = percentage self.__key_modified['percentage'] = 1 def get_name(self): """ The method to get the name Returns: string: A string representing the name """ return self.__name def set_name(self, name): """ The method to set the value to name Parameters: name (string) : A string representing the name """ if name is not None and not isinstance(name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: name EXPECTED TYPE: str', None, None) self.__name = name self.__key_modified['name'] = 1 def get_id(self): """ The method to get the id Returns: int: An int representing the id """ return self.__id def set_id(self, id): """ The method to set the value to id Parameters: id (int) : An int representing the id """ if id is not None and not isinstance(id, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: int', None, None) self.__id = id self.__key_modified['id'] = 1 def get_value(self): """ The method to get the value Returns: float: A float representing the value """ return self.__value def set_value(self, value): """ The method to set the value to value Parameters: value (float) : A float representing the value """ if value is not None and not isinstance(value, float): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: value EXPECTED TYPE: float', None, None) self.__value = value self.__key_modified['value'] = 1 def get_display_name(self): """ The method to get the display_name Returns: string: A string representing the display_name """ return self.__display_name def set_display_name(self, display_name): """ The method to set the value to display_name Parameters: display_name (string) : A string representing the display_name """ if display_name is not None and not isinstance(display_name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: display_name EXPECTED TYPE: str', None, None) self.__display_name = display_name self.__key_modified['display_name'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/record/line_tax.py
line_tax.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants except Exception: from ..exception import SDKException from ..util import Constants class Territory(object): def __init__(self): """Creates an instance of Territory""" self.__assigned = None self.__name = None self.__id = None self.__assigned_time = None self.__assigned_by = None self.__key_modified = dict() def get_assigned(self): """ The method to get the assigned Returns: string: A string representing the assigned """ return self.__assigned def set_assigned(self, assigned): """ The method to set the value to assigned Parameters: assigned (string) : A string representing the assigned """ if assigned is not None and not isinstance(assigned, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: assigned EXPECTED TYPE: str', None, None) self.__assigned = assigned self.__key_modified['$assigned'] = 1 def get_name(self): """ The method to get the name Returns: string: A string representing the name """ return self.__name def set_name(self, name): """ The method to set the value to name Parameters: name (string) : A string representing the name """ if name is not None and not isinstance(name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: name EXPECTED TYPE: str', None, None) self.__name = name self.__key_modified['Name'] = 1 def get_id(self): """ The method to get the id Returns: int: An int representing the id """ return self.__id def set_id(self, id): """ The method to set the value to id Parameters: id (int) : An int representing the id """ if id is not None and not isinstance(id, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: int', None, None) self.__id = id self.__key_modified['id'] = 1 def get_assigned_time(self): """ The method to get the assigned_time Returns: datetime: An instance of datetime """ return self.__assigned_time def set_assigned_time(self, assigned_time): """ The method to set the value to assigned_time Parameters: assigned_time (datetime) : An instance of datetime """ from datetime import datetime if assigned_time is not None and not isinstance(assigned_time, datetime): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: assigned_time EXPECTED TYPE: datetime', None, None) self.__assigned_time = assigned_time self.__key_modified['$assigned_time'] = 1 def get_assigned_by(self): """ The method to get the assigned_by Returns: User: An instance of User """ return self.__assigned_by def set_assigned_by(self, assigned_by): """ The method to set the value to assigned_by Parameters: assigned_by (User) : An instance of User """ try: from zcrmsdk.src.com.zoho.crm.api.users import User except Exception: from ..users import User if assigned_by is not None and not isinstance(assigned_by, User): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: assigned_by EXPECTED TYPE: User', None, None) self.__assigned_by = assigned_by self.__key_modified['$assigned_by'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/record/territory.py
territory.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants except Exception: from ..exception import SDKException from ..util import Constants class Wizard(object): def __init__(self): """Creates an instance of Wizard""" self.__id = None self.__name = None self.__key_modified = dict() def get_id(self): """ The method to get the id Returns: int: An int representing the id """ return self.__id def set_id(self, id): """ The method to set the value to id Parameters: id (int) : An int representing the id """ if id is not None and not isinstance(id, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: int', None, None) self.__id = id self.__key_modified['id'] = 1 def get_name(self): """ The method to get the name Returns: string: A string representing the name """ return self.__name def set_name(self, name): """ The method to set the value to name Parameters: name (string) : A string representing the name """ if name is not None and not isinstance(name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: name EXPECTED TYPE: str', None, None) self.__name = name self.__key_modified['name'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/record/wizard.py
wizard.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants from zcrmsdk.src.com.zoho.crm.api.record.count_handler import CountHandler except Exception: from ..exception import SDKException from ..util import Constants from .count_handler import CountHandler class CountWrapper(CountHandler): def __init__(self): """Creates an instance of CountWrapper""" super().__init__() self.__count = None self.__key_modified = dict() def get_count(self): """ The method to get the count Returns: int: An int representing the count """ return self.__count def set_count(self, count): """ The method to set the value to count Parameters: count (int) : An int representing the count """ if count is not None and not isinstance(count, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: count EXPECTED TYPE: int', None, None) self.__count = count self.__key_modified['count'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/record/count_wrapper.py
count_wrapper.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants from zcrmsdk.src.com.zoho.crm.api.record.mass_update_action_handler import MassUpdateActionHandler except Exception: from ..exception import SDKException from ..util import Constants from .mass_update_action_handler import MassUpdateActionHandler class MassUpdateActionWrapper(MassUpdateActionHandler): def __init__(self): """Creates an instance of MassUpdateActionWrapper""" super().__init__() self.__data = None self.__key_modified = dict() def get_data(self): """ The method to get the data Returns: list: An instance of list """ return self.__data def set_data(self, data): """ The method to set the value to data Parameters: data (list) : An instance of list """ if data is not None and not isinstance(data, list): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: data EXPECTED TYPE: list', None, None) self.__data = data self.__key_modified['data'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/record/mass_update_action_wrapper.py
mass_update_action_wrapper.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants except Exception: from ..exception import SDKException from ..util import Constants class Comment(object): def __init__(self): """Creates an instance of Comment""" self.__commented_by = None self.__commented_time = None self.__comment_content = None self.__id = None self.__key_modified = dict() def get_commented_by(self): """ The method to get the commented_by Returns: string: A string representing the commented_by """ return self.__commented_by def set_commented_by(self, commented_by): """ The method to set the value to commented_by Parameters: commented_by (string) : A string representing the commented_by """ if commented_by is not None and not isinstance(commented_by, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: commented_by EXPECTED TYPE: str', None, None) self.__commented_by = commented_by self.__key_modified['commented_by'] = 1 def get_commented_time(self): """ The method to get the commented_time Returns: datetime: An instance of datetime """ return self.__commented_time def set_commented_time(self, commented_time): """ The method to set the value to commented_time Parameters: commented_time (datetime) : An instance of datetime """ from datetime import datetime if commented_time is not None and not isinstance(commented_time, datetime): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: commented_time EXPECTED TYPE: datetime', None, None) self.__commented_time = commented_time self.__key_modified['commented_time'] = 1 def get_comment_content(self): """ The method to get the comment_content Returns: string: A string representing the comment_content """ return self.__comment_content def set_comment_content(self, comment_content): """ The method to set the value to comment_content Parameters: comment_content (string) : A string representing the comment_content """ if comment_content is not None and not isinstance(comment_content, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: comment_content EXPECTED TYPE: str', None, None) self.__comment_content = comment_content self.__key_modified['comment_content'] = 1 def get_id(self): """ The method to get the id Returns: int: An int representing the id """ return self.__id def set_id(self, id): """ The method to set the value to id Parameters: id (int) : An int representing the id """ if id is not None and not isinstance(id, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: int', None, None) self.__id = id self.__key_modified['id'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/record/comment.py
comment.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants except Exception: from ..exception import SDKException from ..util import Constants class ImageUpload(object): def __init__(self): """Creates an instance of ImageUpload""" self.__description = None self.__preview_id = None self.__encrypted_id = None self.__file_name = None self.__state = None self.__file_id = None self.__size = None self.__sequence_number = None self.__id = None self.__key_modified = dict() def get_description(self): """ The method to get the description Returns: string: A string representing the description """ return self.__description def set_description(self, description): """ The method to set the value to description Parameters: description (string) : A string representing the description """ if description is not None and not isinstance(description, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: description EXPECTED TYPE: str', None, None) self.__description = description self.__key_modified['Description'] = 1 def get_preview_id(self): """ The method to get the preview_id Returns: string: A string representing the preview_id """ return self.__preview_id def set_preview_id(self, preview_id): """ The method to set the value to preview_id Parameters: preview_id (string) : A string representing the preview_id """ if preview_id is not None and not isinstance(preview_id, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: preview_id EXPECTED TYPE: str', None, None) self.__preview_id = preview_id self.__key_modified['Preview_Id'] = 1 def get_encrypted_id(self): """ The method to get the encrypted_id Returns: string: A string representing the encrypted_id """ return self.__encrypted_id def set_encrypted_id(self, encrypted_id): """ The method to set the value to encrypted_id Parameters: encrypted_id (string) : A string representing the encrypted_id """ if encrypted_id is not None and not isinstance(encrypted_id, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: encrypted_id EXPECTED TYPE: str', None, None) self.__encrypted_id = encrypted_id self.__key_modified['Encrypted_Id'] = 1 def get_file_name(self): """ The method to get the file_name Returns: string: A string representing the file_name """ return self.__file_name def set_file_name(self, file_name): """ The method to set the value to file_name Parameters: file_name (string) : A string representing the file_name """ if file_name is not None and not isinstance(file_name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: file_name EXPECTED TYPE: str', None, None) self.__file_name = file_name self.__key_modified['File_Name'] = 1 def get_state(self): """ The method to get the state Returns: string: A string representing the state """ return self.__state def set_state(self, state): """ The method to set the value to state Parameters: state (string) : A string representing the state """ if state is not None and not isinstance(state, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: state EXPECTED TYPE: str', None, None) self.__state = state self.__key_modified['State'] = 1 def get_file_id(self): """ The method to get the file_id Returns: string: A string representing the file_id """ return self.__file_id def set_file_id(self, file_id): """ The method to set the value to file_id Parameters: file_id (string) : A string representing the file_id """ if file_id is not None and not isinstance(file_id, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: file_id EXPECTED TYPE: str', None, None) self.__file_id = file_id self.__key_modified['File_Id'] = 1 def get_size(self): """ The method to get the size Returns: int: An int representing the size """ return self.__size def set_size(self, size): """ The method to set the value to size Parameters: size (int) : An int representing the size """ if size is not None and not isinstance(size, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: size EXPECTED TYPE: int', None, None) self.__size = size self.__key_modified['Size'] = 1 def get_sequence_number(self): """ The method to get the sequence_number Returns: int: An int representing the sequence_number """ return self.__sequence_number def set_sequence_number(self, sequence_number): """ The method to set the value to sequence_number Parameters: sequence_number (int) : An int representing the sequence_number """ if sequence_number is not None and not isinstance(sequence_number, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: sequence_number EXPECTED TYPE: int', None, None) self.__sequence_number = sequence_number self.__key_modified['Sequence_Number'] = 1 def get_id(self): """ The method to get the id Returns: int: An int representing the id """ return self.__id def set_id(self, id): """ The method to set the value to id Parameters: id (int) : An int representing the id """ if id is not None and not isinstance(id, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: int', None, None) self.__id = id self.__key_modified['id'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/record/image_upload.py
image_upload.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Choice, Constants from zcrmsdk.src.com.zoho.crm.api.record.convert_action_response import ConvertActionResponse from zcrmsdk.src.com.zoho.crm.api.record.mass_update_action_handler import MassUpdateActionHandler from zcrmsdk.src.com.zoho.crm.api.record.file_handler import FileHandler from zcrmsdk.src.com.zoho.crm.api.record.mass_update_action_response import MassUpdateActionResponse from zcrmsdk.src.com.zoho.crm.api.record.deleted_records_handler import DeletedRecordsHandler from zcrmsdk.src.com.zoho.crm.api.record.mass_update_response_handler import MassUpdateResponseHandler from zcrmsdk.src.com.zoho.crm.api.record.action_response import ActionResponse from zcrmsdk.src.com.zoho.crm.api.record.response_handler import ResponseHandler from zcrmsdk.src.com.zoho.crm.api.record.mass_update_response import MassUpdateResponse from zcrmsdk.src.com.zoho.crm.api.record.count_handler import CountHandler from zcrmsdk.src.com.zoho.crm.api.record.action_handler import ActionHandler from zcrmsdk.src.com.zoho.crm.api.record.download_handler import DownloadHandler from zcrmsdk.src.com.zoho.crm.api.record.convert_action_handler import ConvertActionHandler except Exception: from ..exception import SDKException from ..util import Choice, Constants from .convert_action_response import ConvertActionResponse from .mass_update_action_handler import MassUpdateActionHandler from .file_handler import FileHandler from .mass_update_action_response import MassUpdateActionResponse from .deleted_records_handler import DeletedRecordsHandler from .mass_update_response_handler import MassUpdateResponseHandler from .action_response import ActionResponse from .response_handler import ResponseHandler from .mass_update_response import MassUpdateResponse from .count_handler import CountHandler from .action_handler import ActionHandler from .download_handler import DownloadHandler from .convert_action_handler import ConvertActionHandler class APIException(ResponseHandler, ActionResponse, ActionHandler, DeletedRecordsHandler, ConvertActionResponse, ConvertActionHandler, DownloadHandler, FileHandler, MassUpdateActionResponse, MassUpdateActionHandler, MassUpdateResponse, MassUpdateResponseHandler, CountHandler): def __init__(self): """Creates an instance of APIException""" super().__init__() self.__status = None self.__code = None self.__message = None self.__details = None self.__key_modified = dict() def get_status(self): """ The method to get the status Returns: Choice: An instance of Choice """ return self.__status def set_status(self, status): """ The method to set the value to status Parameters: status (Choice) : An instance of Choice """ if status is not None and not isinstance(status, Choice): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: status EXPECTED TYPE: Choice', None, None) self.__status = status self.__key_modified['status'] = 1 def get_code(self): """ The method to get the code Returns: Choice: An instance of Choice """ return self.__code def set_code(self, code): """ The method to set the value to code Parameters: code (Choice) : An instance of Choice """ if code is not None and not isinstance(code, Choice): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: code EXPECTED TYPE: Choice', None, None) self.__code = code self.__key_modified['code'] = 1 def get_message(self): """ The method to get the message Returns: Choice: An instance of Choice """ return self.__message def set_message(self, message): """ The method to set the value to message Parameters: message (Choice) : An instance of Choice """ if message is not None and not isinstance(message, Choice): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: message EXPECTED TYPE: Choice', None, None) self.__message = message self.__key_modified['message'] = 1 def get_details(self): """ The method to get the details Returns: dict: An instance of dict """ return self.__details def set_details(self, details): """ The method to set the value to details Parameters: details (dict) : An instance of dict """ if details is not None and not isinstance(details, dict): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: details EXPECTED TYPE: dict', None, None) self.__details = details self.__key_modified['details'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/record/api_exception.py
api_exception.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants except Exception: from ..exception import SDKException from ..util import Constants class Info(object): def __init__(self): """Creates an instance of Info""" self.__per_page = None self.__count = None self.__page = None self.__more_records = None self.__key_modified = dict() def get_per_page(self): """ The method to get the per_page Returns: int: An int representing the per_page """ return self.__per_page def set_per_page(self, per_page): """ The method to set the value to per_page Parameters: per_page (int) : An int representing the per_page """ if per_page is not None and not isinstance(per_page, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: per_page EXPECTED TYPE: int', None, None) self.__per_page = per_page self.__key_modified['per_page'] = 1 def get_count(self): """ The method to get the count Returns: int: An int representing the count """ return self.__count def set_count(self, count): """ The method to set the value to count Parameters: count (int) : An int representing the count """ if count is not None and not isinstance(count, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: count EXPECTED TYPE: int', None, None) self.__count = count self.__key_modified['count'] = 1 def get_page(self): """ The method to get the page Returns: int: An int representing the page """ return self.__page def set_page(self, page): """ The method to set the value to page Parameters: page (int) : An int representing the page """ if page is not None and not isinstance(page, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: page EXPECTED TYPE: int', None, None) self.__page = page self.__key_modified['page'] = 1 def get_more_records(self): """ The method to get the more_records Returns: bool: A bool representing the more_records """ return self.__more_records def set_more_records(self, more_records): """ The method to set the value to more_records Parameters: more_records (bool) : A bool representing the more_records """ if more_records is not None and not isinstance(more_records, bool): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: more_records EXPECTED TYPE: bool', None, None) self.__more_records = more_records self.__key_modified['more_records'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/record/info.py
info.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants from zcrmsdk.src.com.zoho.crm.api.record.convert_action_response import ConvertActionResponse except Exception: from ..exception import SDKException from ..util import Constants from .convert_action_response import ConvertActionResponse class SuccessfulConvert(ConvertActionResponse): def __init__(self): """Creates an instance of SuccessfulConvert""" super().__init__() self.__contacts = None self.__deals = None self.__accounts = None self.__key_modified = dict() def get_contacts(self): """ The method to get the contacts Returns: string: A string representing the contacts """ return self.__contacts def set_contacts(self, contacts): """ The method to set the value to contacts Parameters: contacts (string) : A string representing the contacts """ if contacts is not None and not isinstance(contacts, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: contacts EXPECTED TYPE: str', None, None) self.__contacts = contacts self.__key_modified['Contacts'] = 1 def get_deals(self): """ The method to get the deals Returns: string: A string representing the deals """ return self.__deals def set_deals(self, deals): """ The method to set the value to deals Parameters: deals (string) : A string representing the deals """ if deals is not None and not isinstance(deals, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: deals EXPECTED TYPE: str', None, None) self.__deals = deals self.__key_modified['Deals'] = 1 def get_accounts(self): """ The method to get the accounts Returns: string: A string representing the accounts """ return self.__accounts def set_accounts(self, accounts): """ The method to set the value to accounts Parameters: accounts (string) : A string representing the accounts """ if accounts is not None and not isinstance(accounts, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: accounts EXPECTED TYPE: str', None, None) self.__accounts = accounts self.__key_modified['Accounts'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/record/successful_convert.py
successful_convert.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants except Exception: from ..exception import SDKException from ..util import Constants class Reminder(object): def __init__(self): """Creates an instance of Reminder""" self.__period = None self.__unit = None self.__key_modified = dict() def get_period(self): """ The method to get the period Returns: string: A string representing the period """ return self.__period def set_period(self, period): """ The method to set the value to period Parameters: period (string) : A string representing the period """ if period is not None and not isinstance(period, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: period EXPECTED TYPE: str', None, None) self.__period = period self.__key_modified['period'] = 1 def get_unit(self): """ The method to get the unit Returns: string: A string representing the unit """ return self.__unit def set_unit(self, unit): """ The method to set the value to unit Parameters: unit (string) : A string representing the unit """ if unit is not None and not isinstance(unit, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: unit EXPECTED TYPE: str', None, None) self.__unit = unit self.__key_modified['unit'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/record/reminder.py
reminder.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants from zcrmsdk.src.com.zoho.crm.api.record.mass_update_response_handler import MassUpdateResponseHandler except Exception: from ..exception import SDKException from ..util import Constants from .mass_update_response_handler import MassUpdateResponseHandler class MassUpdateResponseWrapper(MassUpdateResponseHandler): def __init__(self): """Creates an instance of MassUpdateResponseWrapper""" super().__init__() self.__data = None self.__key_modified = dict() def get_data(self): """ The method to get the data Returns: list: An instance of list """ return self.__data def set_data(self, data): """ The method to set the value to data Parameters: data (list) : An instance of list """ if data is not None and not isinstance(data, list): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: data EXPECTED TYPE: list', None, None) self.__data = data self.__key_modified['data'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/record/mass_update_response_wrapper.py
mass_update_response_wrapper.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Choice, Constants except Exception: from ..exception import SDKException from ..util import Choice, Constants class Criteria(object): def __init__(self): """Creates an instance of Criteria""" self.__comparator = None self.__field = None self.__value = None self.__group_operator = None self.__group = None self.__key_modified = dict() def get_comparator(self): """ The method to get the comparator Returns: Choice: An instance of Choice """ return self.__comparator def set_comparator(self, comparator): """ The method to set the value to comparator Parameters: comparator (Choice) : An instance of Choice """ if comparator is not None and not isinstance(comparator, Choice): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: comparator EXPECTED TYPE: Choice', None, None) self.__comparator = comparator self.__key_modified['comparator'] = 1 def get_field(self): """ The method to get the field Returns: string: A string representing the field """ return self.__field def set_field(self, field): """ The method to set the value to field Parameters: field (string) : A string representing the field """ if field is not None and not isinstance(field, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: field EXPECTED TYPE: str', None, None) self.__field = field self.__key_modified['field'] = 1 def get_value(self): """ The method to get the value Returns: Object: A Object representing the value """ return self.__value def set_value(self, value): """ The method to set the value to value Parameters: value (Object) : A Object representing the value """ self.__value = value self.__key_modified['value'] = 1 def get_group_operator(self): """ The method to get the group_operator Returns: Choice: An instance of Choice """ return self.__group_operator def set_group_operator(self, group_operator): """ The method to set the value to group_operator Parameters: group_operator (Choice) : An instance of Choice """ if group_operator is not None and not isinstance(group_operator, Choice): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: group_operator EXPECTED TYPE: Choice', None, None) self.__group_operator = group_operator self.__key_modified['group_operator'] = 1 def get_group(self): """ The method to get the group Returns: list: An instance of list """ return self.__group def set_group(self, group): """ The method to set the value to group Parameters: group (list) : An instance of list """ if group is not None and not isinstance(group, list): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: group EXPECTED TYPE: list', None, None) self.__group = group self.__key_modified['group'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/record/criteria.py
criteria.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Choice, Constants from zcrmsdk.src.com.zoho.crm.api.record.mass_update_action_response import MassUpdateActionResponse except Exception: from ..exception import SDKException from ..util import Choice, Constants from .mass_update_action_response import MassUpdateActionResponse class MassUpdateSuccessResponse(MassUpdateActionResponse): def __init__(self): """Creates an instance of MassUpdateSuccessResponse""" super().__init__() self.__status = None self.__code = None self.__message = None self.__details = None self.__key_modified = dict() def get_status(self): """ The method to get the status Returns: Choice: An instance of Choice """ return self.__status def set_status(self, status): """ The method to set the value to status Parameters: status (Choice) : An instance of Choice """ if status is not None and not isinstance(status, Choice): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: status EXPECTED TYPE: Choice', None, None) self.__status = status self.__key_modified['status'] = 1 def get_code(self): """ The method to get the code Returns: Choice: An instance of Choice """ return self.__code def set_code(self, code): """ The method to set the value to code Parameters: code (Choice) : An instance of Choice """ if code is not None and not isinstance(code, Choice): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: code EXPECTED TYPE: Choice', None, None) self.__code = code self.__key_modified['code'] = 1 def get_message(self): """ The method to get the message Returns: Choice: An instance of Choice """ return self.__message def set_message(self, message): """ The method to set the value to message Parameters: message (Choice) : An instance of Choice """ if message is not None and not isinstance(message, Choice): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: message EXPECTED TYPE: Choice', None, None) self.__message = message self.__key_modified['message'] = 1 def get_details(self): """ The method to get the details Returns: dict: An instance of dict """ return self.__details def set_details(self, details): """ The method to set the value to details Parameters: details (dict) : An instance of dict """ if details is not None and not isinstance(details, dict): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: details EXPECTED TYPE: dict', None, None) self.__details = details self.__key_modified['details'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/record/mass_update_success_response.py
mass_update_success_response.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants from zcrmsdk.src.com.zoho.crm.api.record.record import Record except Exception: from ..exception import SDKException from ..util import Constants from .record import Record class Consent(Record): def __init__(self): """Creates an instance of Consent""" super().__init__() def get_owner(self): """ The method to get the owner Returns: User: An instance of User """ return self.get_key_value('Owner') def set_owner(self, owner): """ The method to set the value to owner Parameters: owner (User) : An instance of User """ try: from zcrmsdk.src.com.zoho.crm.api.users import User except Exception: from ..users import User if owner is not None and not isinstance(owner, User): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: owner EXPECTED TYPE: User', None, None) self.add_key_value('Owner', owner) def get_contact_through_email(self): """ The method to get the contact_through_email Returns: bool: A bool representing the contact_through_email """ return self.get_key_value('Contact_Through_Email') def set_contact_through_email(self, contact_through_email): """ The method to set the value to contact_through_email Parameters: contact_through_email (bool) : A bool representing the contact_through_email """ if contact_through_email is not None and not isinstance(contact_through_email, bool): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: contact_through_email EXPECTED TYPE: bool', None, None) self.add_key_value('Contact_Through_Email', contact_through_email) def get_contact_through_social(self): """ The method to get the contact_through_social Returns: bool: A bool representing the contact_through_social """ return self.get_key_value('Contact_Through_Social') def set_contact_through_social(self, contact_through_social): """ The method to set the value to contact_through_social Parameters: contact_through_social (bool) : A bool representing the contact_through_social """ if contact_through_social is not None and not isinstance(contact_through_social, bool): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: contact_through_social EXPECTED TYPE: bool', None, None) self.add_key_value('Contact_Through_Social', contact_through_social) def get_contact_through_survey(self): """ The method to get the contact_through_survey Returns: bool: A bool representing the contact_through_survey """ return self.get_key_value('Contact_Through_Survey') def set_contact_through_survey(self, contact_through_survey): """ The method to set the value to contact_through_survey Parameters: contact_through_survey (bool) : A bool representing the contact_through_survey """ if contact_through_survey is not None and not isinstance(contact_through_survey, bool): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: contact_through_survey EXPECTED TYPE: bool', None, None) self.add_key_value('Contact_Through_Survey', contact_through_survey) def get_contact_through_phone(self): """ The method to get the contact_through_phone Returns: bool: A bool representing the contact_through_phone """ return self.get_key_value('Contact_Through_Phone') def set_contact_through_phone(self, contact_through_phone): """ The method to set the value to contact_through_phone Parameters: contact_through_phone (bool) : A bool representing the contact_through_phone """ if contact_through_phone is not None and not isinstance(contact_through_phone, bool): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: contact_through_phone EXPECTED TYPE: bool', None, None) self.add_key_value('Contact_Through_Phone', contact_through_phone) def get_mail_sent_time(self): """ The method to get the mail_sent_time Returns: datetime: An instance of datetime """ return self.get_key_value('Mail_Sent_Time') def set_mail_sent_time(self, mail_sent_time): """ The method to set the value to mail_sent_time Parameters: mail_sent_time (datetime) : An instance of datetime """ from datetime import datetime if mail_sent_time is not None and not isinstance(mail_sent_time, datetime): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: mail_sent_time EXPECTED TYPE: datetime', None, None) self.add_key_value('Mail_Sent_Time', mail_sent_time) def get_consent_date(self): """ The method to get the consent_date Returns: date: An instance of date """ return self.get_key_value('Consent_Date') def set_consent_date(self, consent_date): """ The method to set the value to consent_date Parameters: consent_date (date) : An instance of date """ if consent_date is not None and not isinstance(consent_date, date): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: consent_date EXPECTED TYPE: date', None, None) self.add_key_value('Consent_Date', consent_date) def get_consent_remarks(self): """ The method to get the consent_remarks Returns: string: A string representing the consent_remarks """ return self.get_key_value('Consent_Remarks') def set_consent_remarks(self, consent_remarks): """ The method to set the value to consent_remarks Parameters: consent_remarks (string) : A string representing the consent_remarks """ if consent_remarks is not None and not isinstance(consent_remarks, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: consent_remarks EXPECTED TYPE: str', None, None) self.add_key_value('Consent_Remarks', consent_remarks) def get_consent_through(self): """ The method to get the consent_through Returns: string: A string representing the consent_through """ return self.get_key_value('Consent_Through') def set_consent_through(self, consent_through): """ The method to set the value to consent_through Parameters: consent_through (string) : A string representing the consent_through """ if consent_through is not None and not isinstance(consent_through, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: consent_through EXPECTED TYPE: str', None, None) self.add_key_value('Consent_Through', consent_through) def get_data_processing_basis(self): """ The method to get the data_processing_basis Returns: string: A string representing the data_processing_basis """ return self.get_key_value('Data_Processing_Basis') def set_data_processing_basis(self, data_processing_basis): """ The method to set the value to data_processing_basis Parameters: data_processing_basis (string) : A string representing the data_processing_basis """ if data_processing_basis is not None and not isinstance(data_processing_basis, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: data_processing_basis EXPECTED TYPE: str', None, None) self.add_key_value('Data_Processing_Basis', data_processing_basis)
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/record/consent.py
consent.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants except Exception: from ..exception import SDKException from ..util import Constants class Widget(object): def __init__(self): """Creates an instance of Widget""" self.__id = None self.__name = None self.__key_modified = dict() def get_id(self): """ The method to get the id Returns: int: An int representing the id """ return self.__id def set_id(self, id): """ The method to set the value to id Parameters: id (int) : An int representing the id """ if id is not None and not isinstance(id, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: int', None, None) self.__id = id self.__key_modified['id'] = 1 def get_name(self): """ The method to get the name Returns: string: A string representing the name """ return self.__name def set_name(self, name): """ The method to set the value to name Parameters: name (string) : A string representing the name """ if name is not None and not isinstance(name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: name EXPECTED TYPE: str', None, None) self.__name = name self.__key_modified['name'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/record/widget.py
widget.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants except Exception: from ..exception import SDKException from ..util import Constants class Record(object): def __init__(self): """Creates an instance of Record""" self.__key_values = dict() self.__key_modified = dict() def get_id(self): """ The method to get the id Returns: int: An int representing the id """ return self.get_key_value('id') def set_id(self, id): """ The method to set the value to id Parameters: id (int) : An int representing the id """ if id is not None and not isinstance(id, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: int', None, None) self.add_key_value('id', id) def get_created_by(self): """ The method to get the created_by Returns: User: An instance of User """ return self.get_key_value('Created_By') def set_created_by(self, created_by): """ The method to set the value to created_by Parameters: created_by (User) : An instance of User """ try: from zcrmsdk.src.com.zoho.crm.api.users import User except Exception: from ..users import User if created_by is not None and not isinstance(created_by, User): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: created_by EXPECTED TYPE: User', None, None) self.add_key_value('Created_By', created_by) def get_created_time(self): """ The method to get the created_time Returns: datetime: An instance of datetime """ return self.get_key_value('Created_Time') def set_created_time(self, created_time): """ The method to set the value to created_time Parameters: created_time (datetime) : An instance of datetime """ from datetime import datetime if created_time is not None and not isinstance(created_time, datetime): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: created_time EXPECTED TYPE: datetime', None, None) self.add_key_value('Created_Time', created_time) def get_modified_by(self): """ The method to get the modified_by Returns: User: An instance of User """ return self.get_key_value('Modified_By') def set_modified_by(self, modified_by): """ The method to set the value to modified_by Parameters: modified_by (User) : An instance of User """ try: from zcrmsdk.src.com.zoho.crm.api.users import User except Exception: from ..users import User if modified_by is not None and not isinstance(modified_by, User): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modified_by EXPECTED TYPE: User', None, None) self.add_key_value('Modified_By', modified_by) def get_modified_time(self): """ The method to get the modified_time Returns: datetime: An instance of datetime """ return self.get_key_value('Modified_Time') def set_modified_time(self, modified_time): """ The method to set the value to modified_time Parameters: modified_time (datetime) : An instance of datetime """ from datetime import datetime if modified_time is not None and not isinstance(modified_time, datetime): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modified_time EXPECTED TYPE: datetime', None, None) self.add_key_value('Modified_Time', modified_time) def get_tag(self): """ The method to get the tag Returns: list: An instance of list """ return self.get_key_value('Tag') def set_tag(self, tag): """ The method to set the value to tag Parameters: tag (list) : An instance of list """ if tag is not None and not isinstance(tag, list): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: tag EXPECTED TYPE: list', None, None) self.add_key_value('Tag', tag) def add_field_value(self, field, value): """ The method to add field value Parameters: field (Field) : An instance of Field value (object) : An object """ try: from zcrmsdk.src.com.zoho.crm.api.record.field import Field except Exception: from .field import Field if field is not None and not isinstance(field, Field): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: field EXPECTED TYPE: Field', None, None) self.add_key_value(field.get_api_name(), value) def add_key_value(self, api_name, value): """ The method to add key value Parameters: api_name (string) : A string representing the api_name value (Object) : A Object representing the value """ if api_name is not None and not isinstance(api_name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: api_name EXPECTED TYPE: str', None, None) self.__key_values[api_name] = value self.__key_modified[api_name] = 1 def get_key_value(self, api_name): """ The method to get key value Parameters: api_name (string) : A string representing the api_name Returns: Object: A Object representing the key_value """ if api_name is not None and not isinstance(api_name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: api_name EXPECTED TYPE: str', None, None) if api_name in self.__key_values: return self.__key_values.get(api_name) return None def get_key_values(self): """ The method to get key values Returns: dict: An instance of dict """ return self.__key_values def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/record/record.py
record.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants except Exception: from ..exception import SDKException from ..util import Constants class DeletedRecord(object): def __init__(self): """Creates an instance of DeletedRecord""" self.__deleted_by = None self.__id = None self.__display_name = None self.__type = None self.__created_by = None self.__deleted_time = None self.__key_modified = dict() def get_deleted_by(self): """ The method to get the deleted_by Returns: User: An instance of User """ return self.__deleted_by def set_deleted_by(self, deleted_by): """ The method to set the value to deleted_by Parameters: deleted_by (User) : An instance of User """ try: from zcrmsdk.src.com.zoho.crm.api.users import User except Exception: from ..users import User if deleted_by is not None and not isinstance(deleted_by, User): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: deleted_by EXPECTED TYPE: User', None, None) self.__deleted_by = deleted_by self.__key_modified['deleted_by'] = 1 def get_id(self): """ The method to get the id Returns: int: An int representing the id """ return self.__id def set_id(self, id): """ The method to set the value to id Parameters: id (int) : An int representing the id """ if id is not None and not isinstance(id, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: int', None, None) self.__id = id self.__key_modified['id'] = 1 def get_display_name(self): """ The method to get the display_name Returns: string: A string representing the display_name """ return self.__display_name def set_display_name(self, display_name): """ The method to set the value to display_name Parameters: display_name (string) : A string representing the display_name """ if display_name is not None and not isinstance(display_name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: display_name EXPECTED TYPE: str', None, None) self.__display_name = display_name self.__key_modified['display_name'] = 1 def get_type(self): """ The method to get the type Returns: string: A string representing the type """ return self.__type def set_type(self, type): """ The method to set the value to type Parameters: type (string) : A string representing the type """ if type is not None and not isinstance(type, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: type EXPECTED TYPE: str', None, None) self.__type = type self.__key_modified['type'] = 1 def get_created_by(self): """ The method to get the created_by Returns: User: An instance of User """ return self.__created_by def set_created_by(self, created_by): """ The method to set the value to created_by Parameters: created_by (User) : An instance of User """ try: from zcrmsdk.src.com.zoho.crm.api.users import User except Exception: from ..users import User if created_by is not None and not isinstance(created_by, User): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: created_by EXPECTED TYPE: User', None, None) self.__created_by = created_by self.__key_modified['created_by'] = 1 def get_deleted_time(self): """ The method to get the deleted_time Returns: datetime: An instance of datetime """ return self.__deleted_time def set_deleted_time(self, deleted_time): """ The method to set the value to deleted_time Parameters: deleted_time (datetime) : An instance of datetime """ from datetime import datetime if deleted_time is not None and not isinstance(deleted_time, datetime): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: deleted_time EXPECTED TYPE: datetime', None, None) self.__deleted_time = deleted_time self.__key_modified['deleted_time'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/record/deleted_record.py
deleted_record.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants except Exception: from ..exception import SDKException from ..util import Constants class LeadConverter(object): def __init__(self): """Creates an instance of LeadConverter""" self.__overwrite = None self.__notify_lead_owner = None self.__notify_new_entity_owner = None self.__accounts = None self.__contacts = None self.__assign_to = None self.__deals = None self.__carry_over_tags = None self.__key_modified = dict() def get_overwrite(self): """ The method to get the overwrite Returns: bool: A bool representing the overwrite """ return self.__overwrite def set_overwrite(self, overwrite): """ The method to set the value to overwrite Parameters: overwrite (bool) : A bool representing the overwrite """ if overwrite is not None and not isinstance(overwrite, bool): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: overwrite EXPECTED TYPE: bool', None, None) self.__overwrite = overwrite self.__key_modified['overwrite'] = 1 def get_notify_lead_owner(self): """ The method to get the notify_lead_owner Returns: bool: A bool representing the notify_lead_owner """ return self.__notify_lead_owner def set_notify_lead_owner(self, notify_lead_owner): """ The method to set the value to notify_lead_owner Parameters: notify_lead_owner (bool) : A bool representing the notify_lead_owner """ if notify_lead_owner is not None and not isinstance(notify_lead_owner, bool): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: notify_lead_owner EXPECTED TYPE: bool', None, None) self.__notify_lead_owner = notify_lead_owner self.__key_modified['notify_lead_owner'] = 1 def get_notify_new_entity_owner(self): """ The method to get the notify_new_entity_owner Returns: bool: A bool representing the notify_new_entity_owner """ return self.__notify_new_entity_owner def set_notify_new_entity_owner(self, notify_new_entity_owner): """ The method to set the value to notify_new_entity_owner Parameters: notify_new_entity_owner (bool) : A bool representing the notify_new_entity_owner """ if notify_new_entity_owner is not None and not isinstance(notify_new_entity_owner, bool): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: notify_new_entity_owner EXPECTED TYPE: bool', None, None) self.__notify_new_entity_owner = notify_new_entity_owner self.__key_modified['notify_new_entity_owner'] = 1 def get_accounts(self): """ The method to get the accounts Returns: string: A string representing the accounts """ return self.__accounts def set_accounts(self, accounts): """ The method to set the value to accounts Parameters: accounts (string) : A string representing the accounts """ if accounts is not None and not isinstance(accounts, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: accounts EXPECTED TYPE: str', None, None) self.__accounts = accounts self.__key_modified['Accounts'] = 1 def get_contacts(self): """ The method to get the contacts Returns: string: A string representing the contacts """ return self.__contacts def set_contacts(self, contacts): """ The method to set the value to contacts Parameters: contacts (string) : A string representing the contacts """ if contacts is not None and not isinstance(contacts, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: contacts EXPECTED TYPE: str', None, None) self.__contacts = contacts self.__key_modified['Contacts'] = 1 def get_assign_to(self): """ The method to get the assign_to Returns: string: A string representing the assign_to """ return self.__assign_to def set_assign_to(self, assign_to): """ The method to set the value to assign_to Parameters: assign_to (string) : A string representing the assign_to """ if assign_to is not None and not isinstance(assign_to, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: assign_to EXPECTED TYPE: str', None, None) self.__assign_to = assign_to self.__key_modified['assign_to'] = 1 def get_deals(self): """ The method to get the deals Returns: Record: An instance of Record """ return self.__deals def set_deals(self, deals): """ The method to set the value to deals Parameters: deals (Record) : An instance of Record """ try: from zcrmsdk.src.com.zoho.crm.api.record.record import Record except Exception: from .record import Record if deals is not None and not isinstance(deals, Record): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: deals EXPECTED TYPE: Record', None, None) self.__deals = deals self.__key_modified['Deals'] = 1 def get_carry_over_tags(self): """ The method to get the carry_over_tags Returns: CarryOverTags: An instance of CarryOverTags """ return self.__carry_over_tags def set_carry_over_tags(self, carry_over_tags): """ The method to set the value to carry_over_tags Parameters: carry_over_tags (CarryOverTags) : An instance of CarryOverTags """ try: from zcrmsdk.src.com.zoho.crm.api.record.carry_over_tags import CarryOverTags except Exception: from .carry_over_tags import CarryOverTags if carry_over_tags is not None and not isinstance(carry_over_tags, CarryOverTags): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: carry_over_tags EXPECTED TYPE: CarryOverTags', None, None) self.__carry_over_tags = carry_over_tags self.__key_modified['carry_over_tags'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/record/lead_converter.py
lead_converter.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants from zcrmsdk.src.com.zoho.crm.api.record.record import Record except Exception: from ..exception import SDKException from ..util import Constants from .record import Record class LineItemProduct(Record): def __init__(self): """Creates an instance of LineItemProduct""" super().__init__() def get_product_code(self): """ The method to get the product_code Returns: string: A string representing the product_code """ return self.get_key_value('Product_Code') def set_product_code(self, product_code): """ The method to set the value to product_code Parameters: product_code (string) : A string representing the product_code """ if product_code is not None and not isinstance(product_code, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: product_code EXPECTED TYPE: str', None, None) self.add_key_value('Product_Code', product_code) def get_currency(self): """ The method to get the currency Returns: string: A string representing the currency """ return self.get_key_value('Currency') def set_currency(self, currency): """ The method to set the value to currency Parameters: currency (string) : A string representing the currency """ if currency is not None and not isinstance(currency, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: currency EXPECTED TYPE: str', None, None) self.add_key_value('Currency', currency) def get_name(self): """ The method to get the name Returns: string: A string representing the name """ return self.get_key_value('name') def set_name(self, name): """ The method to set the value to name Parameters: name (string) : A string representing the name """ if name is not None and not isinstance(name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: name EXPECTED TYPE: str', None, None) self.add_key_value('name', name)
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/record/line_item_product.py
line_item_product.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import StreamWrapper, Constants from zcrmsdk.src.com.zoho.crm.api.record.response_handler import ResponseHandler from zcrmsdk.src.com.zoho.crm.api.record.download_handler import DownloadHandler except Exception: from ..exception import SDKException from ..util import StreamWrapper, Constants from .response_handler import ResponseHandler from .download_handler import DownloadHandler class FileBodyWrapper(ResponseHandler, DownloadHandler): def __init__(self): """Creates an instance of FileBodyWrapper""" super().__init__() self.__file = None self.__key_modified = dict() def get_file(self): """ The method to get the file Returns: StreamWrapper: An instance of StreamWrapper """ return self.__file def set_file(self, file): """ The method to set the value to file Parameters: file (StreamWrapper) : An instance of StreamWrapper """ if file is not None and not isinstance(file, StreamWrapper): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: file EXPECTED TYPE: StreamWrapper', None, None) self.__file = file self.__key_modified['file'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/record/file_body_wrapper.py
file_body_wrapper.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants except Exception: from ..exception import SDKException from ..util import Constants class Tax(object): def __init__(self): """Creates an instance of Tax""" self.__id = None self.__value = None self.__key_modified = dict() def get_id(self): """ The method to get the id Returns: int: An int representing the id """ return self.__id def set_id(self, id): """ The method to set the value to id Parameters: id (int) : An int representing the id """ if id is not None and not isinstance(id, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: int', None, None) self.__id = id self.__key_modified['id'] = 1 def get_value(self): """ The method to get the value Returns: string: A string representing the value """ return self.__value def set_value(self, value): """ The method to set the value to value Parameters: value (string) : A string representing the value """ if value is not None and not isinstance(value, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: value EXPECTED TYPE: str', None, None) self.__value = value self.__key_modified['value'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/record/tax.py
tax.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants from zcrmsdk.src.com.zoho.crm.api.record.convert_action_handler import ConvertActionHandler except Exception: from ..exception import SDKException from ..util import Constants from .convert_action_handler import ConvertActionHandler class ConvertActionWrapper(ConvertActionHandler): def __init__(self): """Creates an instance of ConvertActionWrapper""" super().__init__() self.__data = None self.__key_modified = dict() def get_data(self): """ The method to get the data Returns: list: An instance of list """ return self.__data def set_data(self, data): """ The method to set the value to data Parameters: data (list) : An instance of list """ if data is not None and not isinstance(data, list): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: data EXPECTED TYPE: list', None, None) self.__data = data self.__key_modified['data'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/record/convert_action_wrapper.py
convert_action_wrapper.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.parameter_map import ParameterMap from zcrmsdk.src.com.zoho.crm.api.util import APIResponse, CommonAPIHandler, Utility, Constants from zcrmsdk.src.com.zoho.crm.api.param import Param from zcrmsdk.src.com.zoho.crm.api.header import Header from zcrmsdk.src.com.zoho.crm.api.header_map import HeaderMap except Exception: from ..exception import SDKException from ..parameter_map import ParameterMap from ..util import APIResponse, CommonAPIHandler, Utility, Constants from ..param import Param from ..header import Header from ..header_map import HeaderMap class RecordOperations(object): def __init__(self): """Creates an instance of RecordOperations""" pass def get_record(self, id, module_api_name, param_instance=None, header_instance=None): """ The method to get record Parameters: id (int) : An int representing the id module_api_name (string) : A string representing the module_api_name param_instance (ParameterMap) : An instance of ParameterMap header_instance (HeaderMap) : An instance of HeaderMap Returns: APIResponse: An instance of APIResponse Raises: SDKException """ if not isinstance(id, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: int', None, None) if not isinstance(module_api_name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: module_api_name EXPECTED TYPE: str', None, None) if param_instance is not None and not isinstance(param_instance, ParameterMap): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: param_instance EXPECTED TYPE: ParameterMap', None, None) if header_instance is not None and not isinstance(header_instance, HeaderMap): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: header_instance EXPECTED TYPE: HeaderMap', None, None) handler_instance = CommonAPIHandler() api_path = '' api_path = api_path + '/crm/v2.1/' api_path = api_path + str(module_api_name) api_path = api_path + '/' api_path = api_path + str(id) handler_instance.set_api_path(api_path) handler_instance.set_http_method(Constants.REQUEST_METHOD_GET) handler_instance.set_category_method(Constants.REQUEST_CATEGORY_READ) handler_instance.set_param(param_instance) handler_instance.set_header(header_instance) handler_instance.set_module_api_name(module_api_name) Utility.get_fields(module_api_name, handler_instance) try: from zcrmsdk.src.com.zoho.crm.api.record.response_handler import ResponseHandler except Exception: from .response_handler import ResponseHandler return handler_instance.api_call(ResponseHandler.__module__, 'application/json') def update_record(self, id, module_api_name, request, header_instance=None): """ The method to update record Parameters: id (int) : An int representing the id module_api_name (string) : A string representing the module_api_name request (BodyWrapper) : An instance of BodyWrapper header_instance (HeaderMap) : An instance of HeaderMap Returns: APIResponse: An instance of APIResponse Raises: SDKException """ try: from zcrmsdk.src.com.zoho.crm.api.record.body_wrapper import BodyWrapper except Exception: from .body_wrapper import BodyWrapper if not isinstance(id, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: int', None, None) if not isinstance(module_api_name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: module_api_name EXPECTED TYPE: str', None, None) if request is not None and not isinstance(request, BodyWrapper): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: request EXPECTED TYPE: BodyWrapper', None, None) if header_instance is not None and not isinstance(header_instance, HeaderMap): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: header_instance EXPECTED TYPE: HeaderMap', None, None) handler_instance = CommonAPIHandler() api_path = '' api_path = api_path + '/crm/v2.1/' api_path = api_path + str(module_api_name) api_path = api_path + '/' api_path = api_path + str(id) handler_instance.set_api_path(api_path) handler_instance.set_http_method(Constants.REQUEST_METHOD_PUT) handler_instance.set_category_method(Constants.REQUEST_CATEGORY_UPDATE) handler_instance.set_content_type('application/json') handler_instance.set_request(request) handler_instance.set_header(header_instance) handler_instance.set_module_api_name(module_api_name) Utility.get_fields(module_api_name, handler_instance) try: from zcrmsdk.src.com.zoho.crm.api.record.action_handler import ActionHandler except Exception: from .action_handler import ActionHandler return handler_instance.api_call(ActionHandler.__module__, 'application/json') def delete_record(self, id, module_api_name, param_instance=None, header_instance=None): """ The method to delete record Parameters: id (int) : An int representing the id module_api_name (string) : A string representing the module_api_name param_instance (ParameterMap) : An instance of ParameterMap header_instance (HeaderMap) : An instance of HeaderMap Returns: APIResponse: An instance of APIResponse Raises: SDKException """ if not isinstance(id, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: int', None, None) if not isinstance(module_api_name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: module_api_name EXPECTED TYPE: str', None, None) if param_instance is not None and not isinstance(param_instance, ParameterMap): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: param_instance EXPECTED TYPE: ParameterMap', None, None) if header_instance is not None and not isinstance(header_instance, HeaderMap): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: header_instance EXPECTED TYPE: HeaderMap', None, None) handler_instance = CommonAPIHandler() api_path = '' api_path = api_path + '/crm/v2.1/' api_path = api_path + str(module_api_name) api_path = api_path + '/' api_path = api_path + str(id) handler_instance.set_api_path(api_path) handler_instance.set_http_method(Constants.REQUEST_METHOD_DELETE) handler_instance.set_category_method(Constants.REQUEST_METHOD_DELETE) handler_instance.set_param(param_instance) handler_instance.set_header(header_instance) Utility.get_fields(module_api_name, handler_instance) try: from zcrmsdk.src.com.zoho.crm.api.record.action_handler import ActionHandler except Exception: from .action_handler import ActionHandler return handler_instance.api_call(ActionHandler.__module__, 'application/json') def get_records(self, module_api_name, param_instance=None, header_instance=None): """ The method to get records Parameters: module_api_name (string) : A string representing the module_api_name param_instance (ParameterMap) : An instance of ParameterMap header_instance (HeaderMap) : An instance of HeaderMap Returns: APIResponse: An instance of APIResponse Raises: SDKException """ if not isinstance(module_api_name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: module_api_name EXPECTED TYPE: str', None, None) if param_instance is not None and not isinstance(param_instance, ParameterMap): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: param_instance EXPECTED TYPE: ParameterMap', None, None) if header_instance is not None and not isinstance(header_instance, HeaderMap): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: header_instance EXPECTED TYPE: HeaderMap', None, None) handler_instance = CommonAPIHandler() api_path = '' api_path = api_path + '/crm/v2.1/' api_path = api_path + str(module_api_name) handler_instance.set_api_path(api_path) handler_instance.set_http_method(Constants.REQUEST_METHOD_GET) handler_instance.set_category_method(Constants.REQUEST_CATEGORY_READ) handler_instance.set_param(param_instance) handler_instance.set_header(header_instance) handler_instance.set_module_api_name(module_api_name) Utility.get_fields(module_api_name, handler_instance) try: from zcrmsdk.src.com.zoho.crm.api.record.response_handler import ResponseHandler except Exception: from .response_handler import ResponseHandler return handler_instance.api_call(ResponseHandler.__module__, 'application/json') def create_records(self, module_api_name, request, header_instance=None): """ The method to create records Parameters: module_api_name (string) : A string representing the module_api_name request (BodyWrapper) : An instance of BodyWrapper header_instance (HeaderMap) : An instance of HeaderMap Returns: APIResponse: An instance of APIResponse Raises: SDKException """ try: from zcrmsdk.src.com.zoho.crm.api.record.body_wrapper import BodyWrapper except Exception: from .body_wrapper import BodyWrapper if not isinstance(module_api_name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: module_api_name EXPECTED TYPE: str', None, None) if request is not None and not isinstance(request, BodyWrapper): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: request EXPECTED TYPE: BodyWrapper', None, None) if header_instance is not None and not isinstance(header_instance, HeaderMap): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: header_instance EXPECTED TYPE: HeaderMap', None, None) handler_instance = CommonAPIHandler() api_path = '' api_path = api_path + '/crm/v2.1/' api_path = api_path + str(module_api_name) handler_instance.set_api_path(api_path) handler_instance.set_http_method(Constants.REQUEST_METHOD_POST) handler_instance.set_category_method(Constants.REQUEST_CATEGORY_CREATE) handler_instance.set_content_type('application/json') handler_instance.set_request(request) handler_instance.set_header(header_instance) handler_instance.set_module_api_name(module_api_name) Utility.get_fields(module_api_name, handler_instance) try: from zcrmsdk.src.com.zoho.crm.api.record.action_handler import ActionHandler except Exception: from .action_handler import ActionHandler return handler_instance.api_call(ActionHandler.__module__, 'application/json') def update_records(self, module_api_name, request, header_instance=None): """ The method to update records Parameters: module_api_name (string) : A string representing the module_api_name request (BodyWrapper) : An instance of BodyWrapper header_instance (HeaderMap) : An instance of HeaderMap Returns: APIResponse: An instance of APIResponse Raises: SDKException """ try: from zcrmsdk.src.com.zoho.crm.api.record.body_wrapper import BodyWrapper except Exception: from .body_wrapper import BodyWrapper if not isinstance(module_api_name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: module_api_name EXPECTED TYPE: str', None, None) if request is not None and not isinstance(request, BodyWrapper): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: request EXPECTED TYPE: BodyWrapper', None, None) if header_instance is not None and not isinstance(header_instance, HeaderMap): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: header_instance EXPECTED TYPE: HeaderMap', None, None) handler_instance = CommonAPIHandler() api_path = '' api_path = api_path + '/crm/v2.1/' api_path = api_path + str(module_api_name) handler_instance.set_api_path(api_path) handler_instance.set_http_method(Constants.REQUEST_METHOD_PUT) handler_instance.set_category_method(Constants.REQUEST_CATEGORY_UPDATE) handler_instance.set_content_type('application/json') handler_instance.set_request(request) handler_instance.set_header(header_instance) handler_instance.set_module_api_name(module_api_name) Utility.get_fields(module_api_name, handler_instance) try: from zcrmsdk.src.com.zoho.crm.api.record.action_handler import ActionHandler except Exception: from .action_handler import ActionHandler return handler_instance.api_call(ActionHandler.__module__, 'application/json') def delete_records(self, module_api_name, param_instance=None, header_instance=None): """ The method to delete records Parameters: module_api_name (string) : A string representing the module_api_name param_instance (ParameterMap) : An instance of ParameterMap header_instance (HeaderMap) : An instance of HeaderMap Returns: APIResponse: An instance of APIResponse Raises: SDKException """ if not isinstance(module_api_name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: module_api_name EXPECTED TYPE: str', None, None) if param_instance is not None and not isinstance(param_instance, ParameterMap): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: param_instance EXPECTED TYPE: ParameterMap', None, None) if header_instance is not None and not isinstance(header_instance, HeaderMap): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: header_instance EXPECTED TYPE: HeaderMap', None, None) handler_instance = CommonAPIHandler() api_path = '' api_path = api_path + '/crm/v2.1/' api_path = api_path + str(module_api_name) handler_instance.set_api_path(api_path) handler_instance.set_http_method(Constants.REQUEST_METHOD_DELETE) handler_instance.set_category_method(Constants.REQUEST_METHOD_DELETE) handler_instance.set_param(param_instance) handler_instance.set_header(header_instance) Utility.get_fields(module_api_name, handler_instance) try: from zcrmsdk.src.com.zoho.crm.api.record.action_handler import ActionHandler except Exception: from .action_handler import ActionHandler return handler_instance.api_call(ActionHandler.__module__, 'application/json') def upsert_records(self, module_api_name, request, header_instance=None): """ The method to upsert records Parameters: module_api_name (string) : A string representing the module_api_name request (BodyWrapper) : An instance of BodyWrapper header_instance (HeaderMap) : An instance of HeaderMap Returns: APIResponse: An instance of APIResponse Raises: SDKException """ try: from zcrmsdk.src.com.zoho.crm.api.record.body_wrapper import BodyWrapper except Exception: from .body_wrapper import BodyWrapper if not isinstance(module_api_name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: module_api_name EXPECTED TYPE: str', None, None) if request is not None and not isinstance(request, BodyWrapper): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: request EXPECTED TYPE: BodyWrapper', None, None) if header_instance is not None and not isinstance(header_instance, HeaderMap): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: header_instance EXPECTED TYPE: HeaderMap', None, None) handler_instance = CommonAPIHandler() api_path = '' api_path = api_path + '/crm/v2.1/' api_path = api_path + str(module_api_name) api_path = api_path + '/upsert' handler_instance.set_api_path(api_path) handler_instance.set_http_method(Constants.REQUEST_METHOD_POST) handler_instance.set_category_method(Constants.REQUEST_CATEGORY_ACTION) handler_instance.set_content_type('application/json') handler_instance.set_request(request) handler_instance.set_header(header_instance) handler_instance.set_module_api_name(module_api_name) Utility.get_fields(module_api_name, handler_instance) try: from zcrmsdk.src.com.zoho.crm.api.record.action_handler import ActionHandler except Exception: from .action_handler import ActionHandler return handler_instance.api_call(ActionHandler.__module__, 'application/json') def get_deleted_records(self, module_api_name, param_instance=None, header_instance=None): """ The method to get deleted records Parameters: module_api_name (string) : A string representing the module_api_name param_instance (ParameterMap) : An instance of ParameterMap header_instance (HeaderMap) : An instance of HeaderMap Returns: APIResponse: An instance of APIResponse Raises: SDKException """ if not isinstance(module_api_name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: module_api_name EXPECTED TYPE: str', None, None) if param_instance is not None and not isinstance(param_instance, ParameterMap): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: param_instance EXPECTED TYPE: ParameterMap', None, None) if header_instance is not None and not isinstance(header_instance, HeaderMap): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: header_instance EXPECTED TYPE: HeaderMap', None, None) handler_instance = CommonAPIHandler() api_path = '' api_path = api_path + '/crm/v2.1/' api_path = api_path + str(module_api_name) api_path = api_path + '/deleted' handler_instance.set_api_path(api_path) handler_instance.set_http_method(Constants.REQUEST_METHOD_GET) handler_instance.set_category_method(Constants.REQUEST_CATEGORY_READ) handler_instance.set_param(param_instance) handler_instance.set_header(header_instance) Utility.get_fields(module_api_name, handler_instance) try: from zcrmsdk.src.com.zoho.crm.api.record.deleted_records_handler import DeletedRecordsHandler except Exception: from .deleted_records_handler import DeletedRecordsHandler return handler_instance.api_call(DeletedRecordsHandler.__module__, 'application/json') def search_records(self, module_api_name, param_instance=None, header_instance=None): """ The method to search records Parameters: module_api_name (string) : A string representing the module_api_name param_instance (ParameterMap) : An instance of ParameterMap header_instance (HeaderMap) : An instance of HeaderMap Returns: APIResponse: An instance of APIResponse Raises: SDKException """ if not isinstance(module_api_name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: module_api_name EXPECTED TYPE: str', None, None) if param_instance is not None and not isinstance(param_instance, ParameterMap): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: param_instance EXPECTED TYPE: ParameterMap', None, None) if header_instance is not None and not isinstance(header_instance, HeaderMap): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: header_instance EXPECTED TYPE: HeaderMap', None, None) handler_instance = CommonAPIHandler() api_path = '' api_path = api_path + '/crm/v2.1/' api_path = api_path + str(module_api_name) api_path = api_path + '/search' handler_instance.set_api_path(api_path) handler_instance.set_http_method(Constants.REQUEST_METHOD_GET) handler_instance.set_category_method(Constants.REQUEST_CATEGORY_READ) handler_instance.set_param(param_instance) handler_instance.set_header(header_instance) handler_instance.set_module_api_name(module_api_name) Utility.get_fields(module_api_name, handler_instance) try: from zcrmsdk.src.com.zoho.crm.api.record.response_handler import ResponseHandler except Exception: from .response_handler import ResponseHandler return handler_instance.api_call(ResponseHandler.__module__, 'application/json') def convert_lead(self, id, request): """ The method to convert lead Parameters: id (int) : An int representing the id request (ConvertBodyWrapper) : An instance of ConvertBodyWrapper Returns: APIResponse: An instance of APIResponse Raises: SDKException """ try: from zcrmsdk.src.com.zoho.crm.api.record.convert_body_wrapper import ConvertBodyWrapper except Exception: from .convert_body_wrapper import ConvertBodyWrapper if not isinstance(id, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: int', None, None) if request is not None and not isinstance(request, ConvertBodyWrapper): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: request EXPECTED TYPE: ConvertBodyWrapper', None, None) handler_instance = CommonAPIHandler() api_path = '' api_path = api_path + '/crm/v2.1/Leads/' api_path = api_path + str(id) api_path = api_path + '/actions/convert' handler_instance.set_api_path(api_path) handler_instance.set_http_method(Constants.REQUEST_METHOD_POST) handler_instance.set_category_method(Constants.REQUEST_CATEGORY_CREATE) handler_instance.set_content_type('application/json') handler_instance.set_request(request) handler_instance.set_mandatory_checker(True) Utility.get_fields("Deals", handler_instance) try: from zcrmsdk.src.com.zoho.crm.api.record.convert_action_handler import ConvertActionHandler except Exception: from .convert_action_handler import ConvertActionHandler return handler_instance.api_call(ConvertActionHandler.__module__, 'application/json') def get_photo(self, id, module_api_name): """ The method to get photo Parameters: id (int) : An int representing the id module_api_name (string) : A string representing the module_api_name Returns: APIResponse: An instance of APIResponse Raises: SDKException """ if not isinstance(id, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: int', None, None) if not isinstance(module_api_name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: module_api_name EXPECTED TYPE: str', None, None) handler_instance = CommonAPIHandler() api_path = '' api_path = api_path + '/crm/v2.1/' api_path = api_path + str(module_api_name) api_path = api_path + '/' api_path = api_path + str(id) api_path = api_path + '/photo' handler_instance.set_api_path(api_path) handler_instance.set_http_method(Constants.REQUEST_METHOD_GET) handler_instance.set_category_method(Constants.REQUEST_CATEGORY_READ) Utility.get_fields(module_api_name, handler_instance) try: from zcrmsdk.src.com.zoho.crm.api.record.download_handler import DownloadHandler except Exception: from .download_handler import DownloadHandler return handler_instance.api_call(DownloadHandler.__module__, 'application/x-download') def upload_photo(self, id, module_api_name, request): """ The method to upload photo Parameters: id (int) : An int representing the id module_api_name (string) : A string representing the module_api_name request (FileBodyWrapper) : An instance of FileBodyWrapper Returns: APIResponse: An instance of APIResponse Raises: SDKException """ try: from zcrmsdk.src.com.zoho.crm.api.record.file_body_wrapper import FileBodyWrapper except Exception: from .file_body_wrapper import FileBodyWrapper if not isinstance(id, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: int', None, None) if not isinstance(module_api_name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: module_api_name EXPECTED TYPE: str', None, None) if request is not None and not isinstance(request, FileBodyWrapper): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: request EXPECTED TYPE: FileBodyWrapper', None, None) handler_instance = CommonAPIHandler() api_path = '' api_path = api_path + '/crm/v2.1/' api_path = api_path + str(module_api_name) api_path = api_path + '/' api_path = api_path + str(id) api_path = api_path + '/photo' handler_instance.set_api_path(api_path) handler_instance.set_http_method(Constants.REQUEST_METHOD_POST) handler_instance.set_category_method(Constants.REQUEST_CATEGORY_CREATE) handler_instance.set_content_type('multipart/form-data') handler_instance.set_request(request) handler_instance.set_mandatory_checker(True) Utility.get_fields(module_api_name, handler_instance) Utility.verify_photo_support(module_api_name) try: from zcrmsdk.src.com.zoho.crm.api.record.file_handler import FileHandler except Exception: from .file_handler import FileHandler return handler_instance.api_call(FileHandler.__module__, 'application/json') def delete_photo(self, id, module_api_name): """ The method to delete photo Parameters: id (int) : An int representing the id module_api_name (string) : A string representing the module_api_name Returns: APIResponse: An instance of APIResponse Raises: SDKException """ if not isinstance(id, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: int', None, None) if not isinstance(module_api_name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: module_api_name EXPECTED TYPE: str', None, None) handler_instance = CommonAPIHandler() api_path = '' api_path = api_path + '/crm/v2.1/' api_path = api_path + str(module_api_name) api_path = api_path + '/' api_path = api_path + str(id) api_path = api_path + '/photo' handler_instance.set_api_path(api_path) handler_instance.set_http_method(Constants.REQUEST_METHOD_DELETE) handler_instance.set_category_method(Constants.REQUEST_METHOD_DELETE) Utility.get_fields(module_api_name, handler_instance) try: from zcrmsdk.src.com.zoho.crm.api.record.file_handler import FileHandler except Exception: from .file_handler import FileHandler return handler_instance.api_call(FileHandler.__module__, 'application/json') def mass_update_records(self, module_api_name, request): """ The method to mass update records Parameters: module_api_name (string) : A string representing the module_api_name request (MassUpdateBodyWrapper) : An instance of MassUpdateBodyWrapper Returns: APIResponse: An instance of APIResponse Raises: SDKException """ try: from zcrmsdk.src.com.zoho.crm.api.record.mass_update_body_wrapper import MassUpdateBodyWrapper except Exception: from .mass_update_body_wrapper import MassUpdateBodyWrapper if not isinstance(module_api_name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: module_api_name EXPECTED TYPE: str', None, None) if request is not None and not isinstance(request, MassUpdateBodyWrapper): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: request EXPECTED TYPE: MassUpdateBodyWrapper', None, None) handler_instance = CommonAPIHandler() api_path = '' api_path = api_path + '/crm/v2.1/' api_path = api_path + str(module_api_name) api_path = api_path + '/actions/mass_update' handler_instance.set_api_path(api_path) handler_instance.set_http_method(Constants.REQUEST_METHOD_POST) handler_instance.set_category_method(Constants.REQUEST_CATEGORY_UPDATE) handler_instance.set_content_type('application/json') handler_instance.set_request(request) handler_instance.set_mandatory_checker(True) handler_instance.set_module_api_name(module_api_name) Utility.get_fields(module_api_name, handler_instance) try: from zcrmsdk.src.com.zoho.crm.api.record.mass_update_action_handler import MassUpdateActionHandler except Exception: from .mass_update_action_handler import MassUpdateActionHandler return handler_instance.api_call(MassUpdateActionHandler.__module__, 'application/json') def get_mass_update_status(self, module_api_name, param_instance=None): """ The method to get mass update status Parameters: module_api_name (string) : A string representing the module_api_name param_instance (ParameterMap) : An instance of ParameterMap Returns: APIResponse: An instance of APIResponse Raises: SDKException """ if not isinstance(module_api_name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: module_api_name EXPECTED TYPE: str', None, None) if param_instance is not None and not isinstance(param_instance, ParameterMap): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: param_instance EXPECTED TYPE: ParameterMap', None, None) handler_instance = CommonAPIHandler() api_path = '' api_path = api_path + '/crm/v2.1/' api_path = api_path + str(module_api_name) api_path = api_path + '/actions/mass_update' handler_instance.set_api_path(api_path) handler_instance.set_http_method(Constants.REQUEST_METHOD_GET) handler_instance.set_category_method(Constants.REQUEST_CATEGORY_READ) handler_instance.set_param(param_instance) Utility.get_fields(module_api_name, handler_instance) try: from zcrmsdk.src.com.zoho.crm.api.record.mass_update_response_handler import MassUpdateResponseHandler except Exception: from .mass_update_response_handler import MassUpdateResponseHandler return handler_instance.api_call(MassUpdateResponseHandler.__module__, 'application/json') def assign_territories_to_multiple_records(self, module_api_name, request): """ The method to assign territories to multiple records Parameters: module_api_name (string) : A string representing the module_api_name request (BodyWrapper) : An instance of BodyWrapper Returns: APIResponse: An instance of APIResponse Raises: SDKException """ try: from zcrmsdk.src.com.zoho.crm.api.record.body_wrapper import BodyWrapper except Exception: from .body_wrapper import BodyWrapper if not isinstance(module_api_name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: module_api_name EXPECTED TYPE: str', None, None) if request is not None and not isinstance(request, BodyWrapper): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: request EXPECTED TYPE: BodyWrapper', None, None) handler_instance = CommonAPIHandler() api_path = '' api_path = api_path + '/crm/v2.1/' api_path = api_path + str(module_api_name) api_path = api_path + '/actions/assign_territories' handler_instance.set_api_path(api_path) handler_instance.set_http_method(Constants.REQUEST_METHOD_POST) handler_instance.set_category_method(Constants.REQUEST_CATEGORY_UPDATE) handler_instance.set_content_type('application/json') handler_instance.set_request(request) handler_instance.set_mandatory_checker(True) handler_instance.set_module_api_name(module_api_name) Utility.get_fields(module_api_name, handler_instance) try: from zcrmsdk.src.com.zoho.crm.api.record.action_handler import ActionHandler except Exception: from .action_handler import ActionHandler return handler_instance.api_call(ActionHandler.__module__, 'application/json') def assign_territory_to_record(self, module_api_name, id, request): """ The method to assign territory to record Parameters: module_api_name (string) : A string representing the module_api_name id (int) : An int representing the id request (BodyWrapper) : An instance of BodyWrapper Returns: APIResponse: An instance of APIResponse Raises: SDKException """ try: from zcrmsdk.src.com.zoho.crm.api.record.body_wrapper import BodyWrapper except Exception: from .body_wrapper import BodyWrapper if not isinstance(module_api_name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: module_api_name EXPECTED TYPE: str', None, None) if not isinstance(id, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: int', None, None) if request is not None and not isinstance(request, BodyWrapper): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: request EXPECTED TYPE: BodyWrapper', None, None) handler_instance = CommonAPIHandler() api_path = '' api_path = api_path + '/crm/v2.1/' api_path = api_path + str(module_api_name) api_path = api_path + '/' api_path = api_path + str(id) api_path = api_path + '/actions/assign_territories' handler_instance.set_api_path(api_path) handler_instance.set_http_method(Constants.REQUEST_METHOD_POST) handler_instance.set_category_method(Constants.REQUEST_CATEGORY_UPDATE) handler_instance.set_content_type('application/json') handler_instance.set_request(request) handler_instance.set_module_api_name(module_api_name) Utility.get_fields(module_api_name, handler_instance) try: from zcrmsdk.src.com.zoho.crm.api.record.action_handler import ActionHandler except Exception: from .action_handler import ActionHandler return handler_instance.api_call(ActionHandler.__module__, 'application/json') def remove_territories_from_multiple_records(self, module_api_name, request): """ The method to remove territories from multiple records Parameters: module_api_name (string) : A string representing the module_api_name request (BodyWrapper) : An instance of BodyWrapper Returns: APIResponse: An instance of APIResponse Raises: SDKException """ try: from zcrmsdk.src.com.zoho.crm.api.record.body_wrapper import BodyWrapper except Exception: from .body_wrapper import BodyWrapper if not isinstance(module_api_name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: module_api_name EXPECTED TYPE: str', None, None) if request is not None and not isinstance(request, BodyWrapper): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: request EXPECTED TYPE: BodyWrapper', None, None) handler_instance = CommonAPIHandler() api_path = '' api_path = api_path + '/crm/v2.1/' api_path = api_path + str(module_api_name) api_path = api_path + '/actions/remove_territories' handler_instance.set_api_path(api_path) handler_instance.set_http_method(Constants.REQUEST_METHOD_POST) handler_instance.set_category_method(Constants.REQUEST_CATEGORY_UPDATE) handler_instance.set_content_type('application/json') handler_instance.set_request(request) handler_instance.set_mandatory_checker(True) handler_instance.set_module_api_name(module_api_name) Utility.get_fields(module_api_name, handler_instance) try: from zcrmsdk.src.com.zoho.crm.api.record.action_handler import ActionHandler except Exception: from .action_handler import ActionHandler return handler_instance.api_call(ActionHandler.__module__, 'application/json') def remove_territories_from_record(self, module_api_name, id, request): """ The method to remove territories from record Parameters: module_api_name (string) : A string representing the module_api_name id (int) : An int representing the id request (BodyWrapper) : An instance of BodyWrapper Returns: APIResponse: An instance of APIResponse Raises: SDKException """ try: from zcrmsdk.src.com.zoho.crm.api.record.body_wrapper import BodyWrapper except Exception: from .body_wrapper import BodyWrapper if not isinstance(module_api_name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: module_api_name EXPECTED TYPE: str', None, None) if not isinstance(id, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: int', None, None) if request is not None and not isinstance(request, BodyWrapper): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: request EXPECTED TYPE: BodyWrapper', None, None) handler_instance = CommonAPIHandler() api_path = '' api_path = api_path + '/crm/v2.1/' api_path = api_path + str(module_api_name) api_path = api_path + '/' api_path = api_path + str(id) api_path = api_path + '/actions/remove_territories' handler_instance.set_api_path(api_path) handler_instance.set_http_method(Constants.REQUEST_METHOD_POST) handler_instance.set_category_method(Constants.REQUEST_CATEGORY_UPDATE) handler_instance.set_content_type('application/json') handler_instance.set_request(request) handler_instance.set_module_api_name(module_api_name) Utility.get_fields(module_api_name, handler_instance) try: from zcrmsdk.src.com.zoho.crm.api.record.action_handler import ActionHandler except Exception: from .action_handler import ActionHandler return handler_instance.api_call(ActionHandler.__module__, 'application/json') def record_count(self, module_api_name, param_instance=None): """ The method to record count Parameters: module_api_name (string) : A string representing the module_api_name param_instance (ParameterMap) : An instance of ParameterMap Returns: APIResponse: An instance of APIResponse Raises: SDKException """ if not isinstance(module_api_name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: module_api_name EXPECTED TYPE: str', None, None) if param_instance is not None and not isinstance(param_instance, ParameterMap): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: param_instance EXPECTED TYPE: ParameterMap', None, None) handler_instance = CommonAPIHandler() api_path = '' api_path = api_path + '/crm/v2.1/' api_path = api_path + str(module_api_name) api_path = api_path + '/actions/count' handler_instance.set_api_path(api_path) handler_instance.set_http_method(Constants.REQUEST_METHOD_GET) handler_instance.set_category_method(Constants.REQUEST_CATEGORY_READ) handler_instance.set_param(param_instance) try: from zcrmsdk.src.com.zoho.crm.api.record.count_handler import CountHandler except Exception: from .count_handler import CountHandler return handler_instance.api_call(CountHandler.__module__, 'application/json') def get_record_using_external_id(self, external_field_value, module_api_name, param_instance=None, header_instance=None): """ The method to get record using external id Parameters: external_field_value (string) : A string representing the external_field_value module_api_name (string) : A string representing the module_api_name param_instance (ParameterMap) : An instance of ParameterMap header_instance (HeaderMap) : An instance of HeaderMap Returns: APIResponse: An instance of APIResponse Raises: SDKException """ if not isinstance(external_field_value, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: external_field_value EXPECTED TYPE: str', None, None) if not isinstance(module_api_name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: module_api_name EXPECTED TYPE: str', None, None) if param_instance is not None and not isinstance(param_instance, ParameterMap): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: param_instance EXPECTED TYPE: ParameterMap', None, None) if header_instance is not None and not isinstance(header_instance, HeaderMap): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: header_instance EXPECTED TYPE: HeaderMap', None, None) handler_instance = CommonAPIHandler() api_path = '' api_path = api_path + '/crm/v2.1/' api_path = api_path + str(module_api_name) api_path = api_path + '/' api_path = api_path + str(external_field_value) handler_instance.set_api_path(api_path) handler_instance.set_http_method(Constants.REQUEST_METHOD_GET) handler_instance.set_category_method(Constants.REQUEST_CATEGORY_READ) handler_instance.set_param(param_instance) handler_instance.set_header(header_instance) handler_instance.set_module_api_name(module_api_name) Utility.get_fields(module_api_name, handler_instance) try: from zcrmsdk.src.com.zoho.crm.api.record.response_handler import ResponseHandler except Exception: from .response_handler import ResponseHandler return handler_instance.api_call(ResponseHandler.__module__, 'application/json') def update_record_using_external_id(self, external_field_value, module_api_name, request, header_instance=None): """ The method to update record using external id Parameters: external_field_value (string) : A string representing the external_field_value module_api_name (string) : A string representing the module_api_name request (BodyWrapper) : An instance of BodyWrapper header_instance (HeaderMap) : An instance of HeaderMap Returns: APIResponse: An instance of APIResponse Raises: SDKException """ try: from zcrmsdk.src.com.zoho.crm.api.record.body_wrapper import BodyWrapper except Exception: from .body_wrapper import BodyWrapper if not isinstance(external_field_value, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: external_field_value EXPECTED TYPE: str', None, None) if not isinstance(module_api_name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: module_api_name EXPECTED TYPE: str', None, None) if request is not None and not isinstance(request, BodyWrapper): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: request EXPECTED TYPE: BodyWrapper', None, None) if header_instance is not None and not isinstance(header_instance, HeaderMap): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: header_instance EXPECTED TYPE: HeaderMap', None, None) handler_instance = CommonAPIHandler() api_path = '' api_path = api_path + '/crm/v2.1/' api_path = api_path + str(module_api_name) api_path = api_path + '/' api_path = api_path + str(external_field_value) handler_instance.set_api_path(api_path) handler_instance.set_http_method(Constants.REQUEST_METHOD_PUT) handler_instance.set_category_method(Constants.REQUEST_CATEGORY_UPDATE) handler_instance.set_content_type('application/json') handler_instance.set_request(request) handler_instance.set_header(header_instance) handler_instance.set_module_api_name(module_api_name) Utility.get_fields(module_api_name, handler_instance) try: from zcrmsdk.src.com.zoho.crm.api.record.action_handler import ActionHandler except Exception: from .action_handler import ActionHandler return handler_instance.api_call(ActionHandler.__module__, 'application/json') def delete_record_using_external_id(self, external_field_value, module_api_name, param_instance=None, header_instance=None): """ The method to delete record using external id Parameters: external_field_value (string) : A string representing the external_field_value module_api_name (string) : A string representing the module_api_name param_instance (ParameterMap) : An instance of ParameterMap header_instance (HeaderMap) : An instance of HeaderMap Returns: APIResponse: An instance of APIResponse Raises: SDKException """ if not isinstance(external_field_value, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: external_field_value EXPECTED TYPE: str', None, None) if not isinstance(module_api_name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: module_api_name EXPECTED TYPE: str', None, None) if param_instance is not None and not isinstance(param_instance, ParameterMap): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: param_instance EXPECTED TYPE: ParameterMap', None, None) if header_instance is not None and not isinstance(header_instance, HeaderMap): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: header_instance EXPECTED TYPE: HeaderMap', None, None) handler_instance = CommonAPIHandler() api_path = '' api_path = api_path + '/crm/v2.1/' api_path = api_path + str(module_api_name) api_path = api_path + '/' api_path = api_path + str(external_field_value) handler_instance.set_api_path(api_path) handler_instance.set_http_method(Constants.REQUEST_METHOD_DELETE) handler_instance.set_category_method(Constants.REQUEST_METHOD_DELETE) handler_instance.set_param(param_instance) handler_instance.set_header(header_instance) Utility.get_fields(module_api_name, handler_instance) try: from zcrmsdk.src.com.zoho.crm.api.record.action_handler import ActionHandler except Exception: from .action_handler import ActionHandler return handler_instance.api_call(ActionHandler.__module__, 'application/json') class GetRecordParam(object): approved = Param('approved', 'com.zoho.crm.api.Record.GetRecordParam') converted = Param('converted', 'com.zoho.crm.api.Record.GetRecordParam') cvid = Param('cvid', 'com.zoho.crm.api.Record.GetRecordParam') uid = Param('uid', 'com.zoho.crm.api.Record.GetRecordParam') fields = Param('fields', 'com.zoho.crm.api.Record.GetRecordParam') startdatetime = Param('startDateTime', 'com.zoho.crm.api.Record.GetRecordParam') enddatetime = Param('endDateTime', 'com.zoho.crm.api.Record.GetRecordParam') territory_id = Param('territory_id', 'com.zoho.crm.api.Record.GetRecordParam') include_child = Param('include_child', 'com.zoho.crm.api.Record.GetRecordParam') class GetRecordHeader(object): if_modified_since = Header('If-Modified-Since', 'com.zoho.crm.api.Record.GetRecordHeader') x_external = Header('X-EXTERNAL', 'com.zoho.crm.api.Record.GetRecordHeader') class UpdateRecordHeader(object): x_external = Header('X-EXTERNAL', 'com.zoho.crm.api.Record.UpdateRecordHeader') class DeleteRecordParam(object): wf_trigger = Param('wf_trigger', 'com.zoho.crm.api.Record.DeleteRecordParam') class DeleteRecordHeader(object): x_external = Header('X-EXTERNAL', 'com.zoho.crm.api.Record.DeleteRecordHeader') class GetRecordsParam(object): approved = Param('approved', 'com.zoho.crm.api.Record.GetRecordsParam') converted = Param('converted', 'com.zoho.crm.api.Record.GetRecordsParam') cvid = Param('cvid', 'com.zoho.crm.api.Record.GetRecordsParam') ids = Param('ids', 'com.zoho.crm.api.Record.GetRecordsParam') uid = Param('uid', 'com.zoho.crm.api.Record.GetRecordsParam') fields = Param('fields', 'com.zoho.crm.api.Record.GetRecordsParam') sort_by = Param('sort_by', 'com.zoho.crm.api.Record.GetRecordsParam') sort_order = Param('sort_order', 'com.zoho.crm.api.Record.GetRecordsParam') page = Param('page', 'com.zoho.crm.api.Record.GetRecordsParam') per_page = Param('per_page', 'com.zoho.crm.api.Record.GetRecordsParam') startdatetime = Param('startDateTime', 'com.zoho.crm.api.Record.GetRecordsParam') enddatetime = Param('endDateTime', 'com.zoho.crm.api.Record.GetRecordsParam') territory_id = Param('territory_id', 'com.zoho.crm.api.Record.GetRecordsParam') include_child = Param('include_child', 'com.zoho.crm.api.Record.GetRecordsParam') class GetRecordsHeader(object): if_modified_since = Header('If-Modified-Since', 'com.zoho.crm.api.Record.GetRecordsHeader') x_external = Header('X-EXTERNAL', 'com.zoho.crm.api.Record.GetRecordsHeader') class CreateRecordsHeader(object): x_external = Header('X-EXTERNAL', 'com.zoho.crm.api.Record.CreateRecordsHeader') class UpdateRecordsHeader(object): x_external = Header('X-EXTERNAL', 'com.zoho.crm.api.Record.UpdateRecordsHeader') class DeleteRecordsParam(object): ids = Param('ids', 'com.zoho.crm.api.Record.DeleteRecordsParam') wf_trigger = Param('wf_trigger', 'com.zoho.crm.api.Record.DeleteRecordsParam') class DeleteRecordsHeader(object): x_external = Header('X-EXTERNAL', 'com.zoho.crm.api.Record.DeleteRecordsHeader') class UpsertRecordsHeader(object): x_external = Header('X-EXTERNAL', 'com.zoho.crm.api.Record.UpsertRecordsHeader') class GetDeletedRecordsParam(object): type = Param('type', 'com.zoho.crm.api.Record.GetDeletedRecordsParam') page = Param('page', 'com.zoho.crm.api.Record.GetDeletedRecordsParam') per_page = Param('per_page', 'com.zoho.crm.api.Record.GetDeletedRecordsParam') class GetDeletedRecordsHeader(object): if_modified_since = Header('If-Modified-Since', 'com.zoho.crm.api.Record.GetDeletedRecordsHeader') class SearchRecordsParam(object): criteria = Param('criteria', 'com.zoho.crm.api.Record.SearchRecordsParam') email = Param('email', 'com.zoho.crm.api.Record.SearchRecordsParam') phone = Param('phone', 'com.zoho.crm.api.Record.SearchRecordsParam') word = Param('word', 'com.zoho.crm.api.Record.SearchRecordsParam') converted = Param('converted', 'com.zoho.crm.api.Record.SearchRecordsParam') approved = Param('approved', 'com.zoho.crm.api.Record.SearchRecordsParam') page = Param('page', 'com.zoho.crm.api.Record.SearchRecordsParam') per_page = Param('per_page', 'com.zoho.crm.api.Record.SearchRecordsParam') fields = Param('fields', 'com.zoho.crm.api.Record.SearchRecordsParam') class SearchRecordsHeader(object): x_external = Header('X-EXTERNAL', 'com.zoho.crm.api.Record.SearchRecordsHeader') class GetMassUpdateStatusParam(object): job_id = Param('job_id', 'com.zoho.crm.api.Record.GetMassUpdateStatusParam') class RecordCountParam(object): criteria = Param('criteria', 'com.zoho.crm.api.Record.RecordCountParam') email = Param('email', 'com.zoho.crm.api.Record.RecordCountParam') phone = Param('phone', 'com.zoho.crm.api.Record.RecordCountParam') word = Param('word', 'com.zoho.crm.api.Record.RecordCountParam') class GetRecordUsingExternalIDParam(object): approved = Param('approved', 'com.zoho.crm.api.Record.GetRecordUsingExternalIDParam') converted = Param('converted', 'com.zoho.crm.api.Record.GetRecordUsingExternalIDParam') cvid = Param('cvid', 'com.zoho.crm.api.Record.GetRecordUsingExternalIDParam') uid = Param('uid', 'com.zoho.crm.api.Record.GetRecordUsingExternalIDParam') fields = Param('fields', 'com.zoho.crm.api.Record.GetRecordUsingExternalIDParam') startdatetime = Param('startDateTime', 'com.zoho.crm.api.Record.GetRecordUsingExternalIDParam') enddatetime = Param('endDateTime', 'com.zoho.crm.api.Record.GetRecordUsingExternalIDParam') territory_id = Param('territory_id', 'com.zoho.crm.api.Record.GetRecordUsingExternalIDParam') include_child = Param('include_child', 'com.zoho.crm.api.Record.GetRecordUsingExternalIDParam') class GetRecordUsingExternalIDHeader(object): if_modified_since = Header('If-Modified-Since', 'com.zoho.crm.api.Record.GetRecordUsingExternalIDHeader') x_external = Header('X-EXTERNAL', 'com.zoho.crm.api.Record.GetRecordUsingExternalIDHeader') class UpdateRecordUsingExternalIDHeader(object): x_external = Header('X-EXTERNAL', 'com.zoho.crm.api.Record.UpdateRecordUsingExternalIDHeader') class DeleteRecordUsingExternalIDParam(object): wf_trigger = Param('wf_trigger', 'com.zoho.crm.api.Record.DeleteRecordUsingExternalIDParam') class DeleteRecordUsingExternalIDHeader(object): x_external = Header('X-EXTERNAL', 'com.zoho.crm.api.Record.DeleteRecordUsingExternalIDHeader')
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/record/record_operations.py
record_operations.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants except Exception: from ..exception import SDKException from ..util import Constants class MultiSelectPicklist(object): def __init__(self): """Creates an instance of MultiSelectPicklist""" self.__id = None self.__fieldname = None self.__key_modified = dict() def get_id(self): """ The method to get the id Returns: int: An int representing the id """ return self.__id def set_id(self, id): """ The method to set the value to id Parameters: id (int) : An int representing the id """ if id is not None and not isinstance(id, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: int', None, None) self.__id = id self.__key_modified['id'] = 1 def get_fieldname(self): """ The method to get the fieldname Returns: dict: An instance of dict """ return self.__fieldname def set_fieldname(self, fieldname): """ The method to set the value to fieldname Parameters: fieldname (dict) : An instance of dict """ if fieldname is not None and not isinstance(fieldname, dict): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: fieldname EXPECTED TYPE: dict', None, None) self.__fieldname = fieldname self.__key_modified['fieldName'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/record/multi_select_picklist.py
multi_select_picklist.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Choice, Constants from zcrmsdk.src.com.zoho.crm.api.record.mass_update_response import MassUpdateResponse except Exception: from ..exception import SDKException from ..util import Choice, Constants from .mass_update_response import MassUpdateResponse class MassUpdate(MassUpdateResponse): def __init__(self): """Creates an instance of MassUpdate""" super().__init__() self.__status = None self.__failed_count = None self.__updated_count = None self.__not_updated_count = None self.__total_count = None self.__key_modified = dict() def get_status(self): """ The method to get the status Returns: Choice: An instance of Choice """ return self.__status def set_status(self, status): """ The method to set the value to status Parameters: status (Choice) : An instance of Choice """ if status is not None and not isinstance(status, Choice): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: status EXPECTED TYPE: Choice', None, None) self.__status = status self.__key_modified['Status'] = 1 def get_failed_count(self): """ The method to get the failed_count Returns: int: An int representing the failed_count """ return self.__failed_count def set_failed_count(self, failed_count): """ The method to set the value to failed_count Parameters: failed_count (int) : An int representing the failed_count """ if failed_count is not None and not isinstance(failed_count, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: failed_count EXPECTED TYPE: int', None, None) self.__failed_count = failed_count self.__key_modified['Failed_Count'] = 1 def get_updated_count(self): """ The method to get the updated_count Returns: int: An int representing the updated_count """ return self.__updated_count def set_updated_count(self, updated_count): """ The method to set the value to updated_count Parameters: updated_count (int) : An int representing the updated_count """ if updated_count is not None and not isinstance(updated_count, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: updated_count EXPECTED TYPE: int', None, None) self.__updated_count = updated_count self.__key_modified['Updated_Count'] = 1 def get_not_updated_count(self): """ The method to get the not_updated_count Returns: int: An int representing the not_updated_count """ return self.__not_updated_count def set_not_updated_count(self, not_updated_count): """ The method to set the value to not_updated_count Parameters: not_updated_count (int) : An int representing the not_updated_count """ if not_updated_count is not None and not isinstance(not_updated_count, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: not_updated_count EXPECTED TYPE: int', None, None) self.__not_updated_count = not_updated_count self.__key_modified['Not_Updated_Count'] = 1 def get_total_count(self): """ The method to get the total_count Returns: int: An int representing the total_count """ return self.__total_count def set_total_count(self, total_count): """ The method to set the value to total_count Parameters: total_count (int) : An int representing the total_count """ if total_count is not None and not isinstance(total_count, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: total_count EXPECTED TYPE: int', None, None) self.__total_count = total_count self.__key_modified['Total_Count'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/record/mass_update.py
mass_update.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants except Exception: from ..exception import SDKException from ..util import Constants class FileDetails(object): def __init__(self): """Creates an instance of FileDetails""" self.__extn = None self.__is_preview_available = None self.__download_url = None self.__delete_url = None self.__entity_id = None self.__mode = None self.__original_size_byte = None self.__preview_url = None self.__file_name = None self.__file_id = None self.__attachment_id = None self.__file_size = None self.__creator_id = None self.__link_docs = None self.__delete = None self.__key_modified = dict() def get_extn(self): """ The method to get the extn Returns: string: A string representing the extn """ return self.__extn def set_extn(self, extn): """ The method to set the value to extn Parameters: extn (string) : A string representing the extn """ if extn is not None and not isinstance(extn, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: extn EXPECTED TYPE: str', None, None) self.__extn = extn self.__key_modified['extn'] = 1 def get_is_preview_available(self): """ The method to get the is_preview_available Returns: bool: A bool representing the is_preview_available """ return self.__is_preview_available def set_is_preview_available(self, is_preview_available): """ The method to set the value to is_preview_available Parameters: is_preview_available (bool) : A bool representing the is_preview_available """ if is_preview_available is not None and not isinstance(is_preview_available, bool): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: is_preview_available EXPECTED TYPE: bool', None, None) self.__is_preview_available = is_preview_available self.__key_modified['is_Preview_Available'] = 1 def get_download_url(self): """ The method to get the download_url Returns: string: A string representing the download_url """ return self.__download_url def set_download_url(self, download_url): """ The method to set the value to download_url Parameters: download_url (string) : A string representing the download_url """ if download_url is not None and not isinstance(download_url, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: download_url EXPECTED TYPE: str', None, None) self.__download_url = download_url self.__key_modified['download_Url'] = 1 def get_delete_url(self): """ The method to get the delete_url Returns: string: A string representing the delete_url """ return self.__delete_url def set_delete_url(self, delete_url): """ The method to set the value to delete_url Parameters: delete_url (string) : A string representing the delete_url """ if delete_url is not None and not isinstance(delete_url, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: delete_url EXPECTED TYPE: str', None, None) self.__delete_url = delete_url self.__key_modified['delete_Url'] = 1 def get_entity_id(self): """ The method to get the entity_id Returns: string: A string representing the entity_id """ return self.__entity_id def set_entity_id(self, entity_id): """ The method to set the value to entity_id Parameters: entity_id (string) : A string representing the entity_id """ if entity_id is not None and not isinstance(entity_id, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: entity_id EXPECTED TYPE: str', None, None) self.__entity_id = entity_id self.__key_modified['entity_Id'] = 1 def get_mode(self): """ The method to get the mode Returns: string: A string representing the mode """ return self.__mode def set_mode(self, mode): """ The method to set the value to mode Parameters: mode (string) : A string representing the mode """ if mode is not None and not isinstance(mode, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: mode EXPECTED TYPE: str', None, None) self.__mode = mode self.__key_modified['mode'] = 1 def get_original_size_byte(self): """ The method to get the original_size_byte Returns: string: A string representing the original_size_byte """ return self.__original_size_byte def set_original_size_byte(self, original_size_byte): """ The method to set the value to original_size_byte Parameters: original_size_byte (string) : A string representing the original_size_byte """ if original_size_byte is not None and not isinstance(original_size_byte, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: original_size_byte EXPECTED TYPE: str', None, None) self.__original_size_byte = original_size_byte self.__key_modified['original_Size_Byte'] = 1 def get_preview_url(self): """ The method to get the preview_url Returns: string: A string representing the preview_url """ return self.__preview_url def set_preview_url(self, preview_url): """ The method to set the value to preview_url Parameters: preview_url (string) : A string representing the preview_url """ if preview_url is not None and not isinstance(preview_url, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: preview_url EXPECTED TYPE: str', None, None) self.__preview_url = preview_url self.__key_modified['preview_Url'] = 1 def get_file_name(self): """ The method to get the file_name Returns: string: A string representing the file_name """ return self.__file_name def set_file_name(self, file_name): """ The method to set the value to file_name Parameters: file_name (string) : A string representing the file_name """ if file_name is not None and not isinstance(file_name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: file_name EXPECTED TYPE: str', None, None) self.__file_name = file_name self.__key_modified['file_Name'] = 1 def get_file_id(self): """ The method to get the file_id Returns: string: A string representing the file_id """ return self.__file_id def set_file_id(self, file_id): """ The method to set the value to file_id Parameters: file_id (string) : A string representing the file_id """ if file_id is not None and not isinstance(file_id, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: file_id EXPECTED TYPE: str', None, None) self.__file_id = file_id self.__key_modified['file_Id'] = 1 def get_attachment_id(self): """ The method to get the attachment_id Returns: string: A string representing the attachment_id """ return self.__attachment_id def set_attachment_id(self, attachment_id): """ The method to set the value to attachment_id Parameters: attachment_id (string) : A string representing the attachment_id """ if attachment_id is not None and not isinstance(attachment_id, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: attachment_id EXPECTED TYPE: str', None, None) self.__attachment_id = attachment_id self.__key_modified['attachment_Id'] = 1 def get_file_size(self): """ The method to get the file_size Returns: string: A string representing the file_size """ return self.__file_size def set_file_size(self, file_size): """ The method to set the value to file_size Parameters: file_size (string) : A string representing the file_size """ if file_size is not None and not isinstance(file_size, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: file_size EXPECTED TYPE: str', None, None) self.__file_size = file_size self.__key_modified['file_Size'] = 1 def get_creator_id(self): """ The method to get the creator_id Returns: string: A string representing the creator_id """ return self.__creator_id def set_creator_id(self, creator_id): """ The method to set the value to creator_id Parameters: creator_id (string) : A string representing the creator_id """ if creator_id is not None and not isinstance(creator_id, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: creator_id EXPECTED TYPE: str', None, None) self.__creator_id = creator_id self.__key_modified['creator_Id'] = 1 def get_link_docs(self): """ The method to get the link_docs Returns: int: An int representing the link_docs """ return self.__link_docs def set_link_docs(self, link_docs): """ The method to set the value to link_docs Parameters: link_docs (int) : An int representing the link_docs """ if link_docs is not None and not isinstance(link_docs, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: link_docs EXPECTED TYPE: int', None, None) self.__link_docs = link_docs self.__key_modified['link_Docs'] = 1 def get_delete(self): """ The method to get the delete Returns: string: A string representing the delete """ return self.__delete def set_delete(self, delete): """ The method to set the value to delete Parameters: delete (string) : A string representing the delete """ if delete is not None and not isinstance(delete, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: delete EXPECTED TYPE: str', None, None) self.__delete = delete self.__key_modified['_delete'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/record/file_details.py
file_details.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants except Exception: from ..exception import SDKException from ..util import Constants class MassUpdateBodyWrapper(object): def __init__(self): """Creates an instance of MassUpdateBodyWrapper""" self.__data = None self.__cvid = None self.__ids = None self.__territory = None self.__over_write = None self.__criteria = None self.__key_modified = dict() def get_data(self): """ The method to get the data Returns: list: An instance of list """ return self.__data def set_data(self, data): """ The method to set the value to data Parameters: data (list) : An instance of list """ if data is not None and not isinstance(data, list): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: data EXPECTED TYPE: list', None, None) self.__data = data self.__key_modified['data'] = 1 def get_cvid(self): """ The method to get the cvid Returns: string: A string representing the cvid """ return self.__cvid def set_cvid(self, cvid): """ The method to set the value to cvid Parameters: cvid (string) : A string representing the cvid """ if cvid is not None and not isinstance(cvid, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: cvid EXPECTED TYPE: str', None, None) self.__cvid = cvid self.__key_modified['cvid'] = 1 def get_ids(self): """ The method to get the ids Returns: list: An instance of list """ return self.__ids def set_ids(self, ids): """ The method to set the value to ids Parameters: ids (list) : An instance of list """ if ids is not None and not isinstance(ids, list): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: ids EXPECTED TYPE: list', None, None) self.__ids = ids self.__key_modified['ids'] = 1 def get_territory(self): """ The method to get the territory Returns: MassUpdateTerritory: An instance of MassUpdateTerritory """ return self.__territory def set_territory(self, territory): """ The method to set the value to territory Parameters: territory (MassUpdateTerritory) : An instance of MassUpdateTerritory """ try: from zcrmsdk.src.com.zoho.crm.api.record.mass_update_territory import MassUpdateTerritory except Exception: from .mass_update_territory import MassUpdateTerritory if territory is not None and not isinstance(territory, MassUpdateTerritory): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: territory EXPECTED TYPE: MassUpdateTerritory', None, None) self.__territory = territory self.__key_modified['territory'] = 1 def get_over_write(self): """ The method to get the over_write Returns: bool: A bool representing the over_write """ return self.__over_write def set_over_write(self, over_write): """ The method to set the value to over_write Parameters: over_write (bool) : A bool representing the over_write """ if over_write is not None and not isinstance(over_write, bool): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: over_write EXPECTED TYPE: bool', None, None) self.__over_write = over_write self.__key_modified['over_write'] = 1 def get_criteria(self): """ The method to get the criteria Returns: list: An instance of list """ return self.__criteria def set_criteria(self, criteria): """ The method to set the value to criteria Parameters: criteria (list) : An instance of list """ if criteria is not None and not isinstance(criteria, list): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: criteria EXPECTED TYPE: list', None, None) self.__criteria = criteria self.__key_modified['criteria'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/record/mass_update_body_wrapper.py
mass_update_body_wrapper.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants from zcrmsdk.src.com.zoho.crm.api.record.record import Record except Exception: from ..exception import SDKException from ..util import Constants from .record import Record class Participants(Record): def __init__(self): """Creates an instance of Participants""" super().__init__() def get_name(self): """ The method to get the name Returns: string: A string representing the name """ return self.get_key_value('name') def set_name(self, name): """ The method to set the value to name Parameters: name (string) : A string representing the name """ if name is not None and not isinstance(name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: name EXPECTED TYPE: str', None, None) self.add_key_value('name', name) def get_email(self): """ The method to get the email Returns: string: A string representing the email """ return self.get_key_value('Email') def set_email(self, email): """ The method to set the value to email Parameters: email (string) : A string representing the email """ if email is not None and not isinstance(email, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: email EXPECTED TYPE: str', None, None) self.add_key_value('Email', email) def get_invited(self): """ The method to get the invited Returns: bool: A bool representing the invited """ return self.get_key_value('invited') def set_invited(self, invited): """ The method to set the value to invited Parameters: invited (bool) : A bool representing the invited """ if invited is not None and not isinstance(invited, bool): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: invited EXPECTED TYPE: bool', None, None) self.add_key_value('invited', invited) def get_type(self): """ The method to get the type Returns: string: A string representing the type """ return self.get_key_value('type') def set_type(self, type): """ The method to set the value to type Parameters: type (string) : A string representing the type """ if type is not None and not isinstance(type, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: type EXPECTED TYPE: str', None, None) self.add_key_value('type', type) def get_participant(self): """ The method to get the participant Returns: string: A string representing the participant """ return self.get_key_value('participant') def set_participant(self, participant): """ The method to set the value to participant Parameters: participant (string) : A string representing the participant """ if participant is not None and not isinstance(participant, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: participant EXPECTED TYPE: str', None, None) self.add_key_value('participant', participant) def get_status(self): """ The method to get the status Returns: string: A string representing the status """ return self.get_key_value('status') def set_status(self, status): """ The method to set the value to status Parameters: status (string) : A string representing the status """ if status is not None and not isinstance(status, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: status EXPECTED TYPE: str', None, None) self.add_key_value('status', status)
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/record/participants.py
participants.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants except Exception: from ..exception import SDKException from ..util import Constants class BodyWrapper(object): def __init__(self): """Creates an instance of BodyWrapper""" self.__data = None self.__trigger = None self.__apply_feature_execution = None self.__process = None self.__duplicate_check_fields = None self.__wf_trigger = None self.__lar_id = None self.__key_modified = dict() def get_data(self): """ The method to get the data Returns: list: An instance of list """ return self.__data def set_data(self, data): """ The method to set the value to data Parameters: data (list) : An instance of list """ if data is not None and not isinstance(data, list): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: data EXPECTED TYPE: list', None, None) self.__data = data self.__key_modified['data'] = 1 def get_trigger(self): """ The method to get the trigger Returns: list: An instance of list """ return self.__trigger def set_trigger(self, trigger): """ The method to set the value to trigger Parameters: trigger (list) : An instance of list """ if trigger is not None and not isinstance(trigger, list): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: trigger EXPECTED TYPE: list', None, None) self.__trigger = trigger self.__key_modified['trigger'] = 1 def get_apply_feature_execution(self): """ The method to get the apply_feature_execution Returns: list: An instance of list """ return self.__apply_feature_execution def set_apply_feature_execution(self, apply_feature_execution): """ The method to set the value to apply_feature_execution Parameters: apply_feature_execution (list) : An instance of list """ if apply_feature_execution is not None and not isinstance(apply_feature_execution, list): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: apply_feature_execution EXPECTED TYPE: list', None, None) self.__apply_feature_execution = apply_feature_execution self.__key_modified['apply_feature_execution'] = 1 def get_process(self): """ The method to get the process Returns: list: An instance of list """ return self.__process def set_process(self, process): """ The method to set the value to process Parameters: process (list) : An instance of list """ if process is not None and not isinstance(process, list): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: process EXPECTED TYPE: list', None, None) self.__process = process self.__key_modified['process'] = 1 def get_duplicate_check_fields(self): """ The method to get the duplicate_check_fields Returns: list: An instance of list """ return self.__duplicate_check_fields def set_duplicate_check_fields(self, duplicate_check_fields): """ The method to set the value to duplicate_check_fields Parameters: duplicate_check_fields (list) : An instance of list """ if duplicate_check_fields is not None and not isinstance(duplicate_check_fields, list): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: duplicate_check_fields EXPECTED TYPE: list', None, None) self.__duplicate_check_fields = duplicate_check_fields self.__key_modified['duplicate_check_fields'] = 1 def get_wf_trigger(self): """ The method to get the wf_trigger Returns: string: A string representing the wf_trigger """ return self.__wf_trigger def set_wf_trigger(self, wf_trigger): """ The method to set the value to wf_trigger Parameters: wf_trigger (string) : A string representing the wf_trigger """ if wf_trigger is not None and not isinstance(wf_trigger, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: wf_trigger EXPECTED TYPE: str', None, None) self.__wf_trigger = wf_trigger self.__key_modified['wf_trigger'] = 1 def get_lar_id(self): """ The method to get the lar_id Returns: string: A string representing the lar_id """ return self.__lar_id def set_lar_id(self, lar_id): """ The method to set the value to lar_id Parameters: lar_id (string) : A string representing the lar_id """ if lar_id is not None and not isinstance(lar_id, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: lar_id EXPECTED TYPE: str', None, None) self.__lar_id = lar_id self.__key_modified['lar_id'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/record/body_wrapper.py
body_wrapper.py
from .image_upload import ImageUpload from .criteria import Criteria from .file_details import FileDetails from .apply_feature_execution import ApplyFeatureExecution from .record_operations import RecordOperations, GetRecordParam, GetRecordHeader, UpdateRecordHeader, DeleteRecordParam, DeleteRecordHeader, GetRecordsParam, GetRecordsHeader, CreateRecordsHeader, UpdateRecordsHeader, DeleteRecordsParam, DeleteRecordsHeader, UpsertRecordsHeader, GetDeletedRecordsParam, GetDeletedRecordsHeader, SearchRecordsParam, SearchRecordsHeader, GetMassUpdateStatusParam, RecordCountParam, GetRecordUsingExternalIDParam, GetRecordUsingExternalIDHeader, UpdateRecordUsingExternalIDHeader, DeleteRecordUsingExternalIDParam, DeleteRecordUsingExternalIDHeader from .count_wrapper import CountWrapper from .mass_update_response_wrapper import MassUpdateResponseWrapper from .recurring_activity import RecurringActivity from .record import Record from .options import Options from .download_handler import DownloadHandler from .info import Info from .convert_action_response import ConvertActionResponse from .convert_action_wrapper import ConvertActionWrapper from .body_wrapper import BodyWrapper from .tax import Tax from .consent import Consent from .lead_converter import LeadConverter from .convert_body_wrapper import ConvertBodyWrapper from .multi_select_lookup import MultiSelectLookup from .line_item_product import LineItemProduct from .field import Field from .count_handler import CountHandler from .mass_update_success_response import MassUpdateSuccessResponse from .convert_action_handler import ConvertActionHandler from .line_tax import LineTax from .widget import Widget from .deleted_record import DeletedRecord from .pricing_details import PricingDetails from .api_exception import APIException from .response_handler import ResponseHandler from .action_response import ActionResponse from .success_response import SuccessResponse from .file_body_wrapper import FileBodyWrapper from .mass_update_response import MassUpdateResponse from .action_handler import ActionHandler from .price_book import PriceBook from .participants import Participants from .successful_convert import SuccessfulConvert from .action_wrapper import ActionWrapper from .mass_update_action_wrapper import MassUpdateActionWrapper from .reminder import Reminder from .mass_update_action_handler import MassUpdateActionHandler from .mass_update_body_wrapper import MassUpdateBodyWrapper from .deleted_records_wrapper import DeletedRecordsWrapper from .file_handler import FileHandler from .remind_at import RemindAt from .mass_update_action_response import MassUpdateActionResponse from .deleted_records_handler import DeletedRecordsHandler from .mass_update_territory import MassUpdateTerritory from .mass_update_response_handler import MassUpdateResponseHandler from .carry_over_tags import CarryOverTags from .multi_select_picklist import MultiSelectPicklist from .response_wrapper import ResponseWrapper from .comment import Comment from .wizard import Wizard from .mass_update import MassUpdate from .territory import Territory
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/record/__init__.py
__init__.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Choice, Constants from zcrmsdk.src.com.zoho.crm.api.record.action_response import ActionResponse from zcrmsdk.src.com.zoho.crm.api.record.file_handler import FileHandler except Exception: from ..exception import SDKException from ..util import Choice, Constants from .action_response import ActionResponse from .file_handler import FileHandler class SuccessResponse(ActionResponse, FileHandler): def __init__(self): """Creates an instance of SuccessResponse""" super().__init__() self.__status = None self.__code = None self.__duplicate_field = None self.__action = None self.__message = None self.__details = None self.__key_modified = dict() def get_status(self): """ The method to get the status Returns: Choice: An instance of Choice """ return self.__status def set_status(self, status): """ The method to set the value to status Parameters: status (Choice) : An instance of Choice """ if status is not None and not isinstance(status, Choice): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: status EXPECTED TYPE: Choice', None, None) self.__status = status self.__key_modified['status'] = 1 def get_code(self): """ The method to get the code Returns: Choice: An instance of Choice """ return self.__code def set_code(self, code): """ The method to set the value to code Parameters: code (Choice) : An instance of Choice """ if code is not None and not isinstance(code, Choice): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: code EXPECTED TYPE: Choice', None, None) self.__code = code self.__key_modified['code'] = 1 def get_duplicate_field(self): """ The method to get the duplicate_field Returns: string: A string representing the duplicate_field """ return self.__duplicate_field def set_duplicate_field(self, duplicate_field): """ The method to set the value to duplicate_field Parameters: duplicate_field (string) : A string representing the duplicate_field """ if duplicate_field is not None and not isinstance(duplicate_field, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: duplicate_field EXPECTED TYPE: str', None, None) self.__duplicate_field = duplicate_field self.__key_modified['duplicate_field'] = 1 def get_action(self): """ The method to get the action Returns: Choice: An instance of Choice """ return self.__action def set_action(self, action): """ The method to set the value to action Parameters: action (Choice) : An instance of Choice """ if action is not None and not isinstance(action, Choice): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: action EXPECTED TYPE: Choice', None, None) self.__action = action self.__key_modified['action'] = 1 def get_message(self): """ The method to get the message Returns: Choice: An instance of Choice """ return self.__message def set_message(self, message): """ The method to set the value to message Parameters: message (Choice) : An instance of Choice """ if message is not None and not isinstance(message, Choice): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: message EXPECTED TYPE: Choice', None, None) self.__message = message self.__key_modified['message'] = 1 def get_details(self): """ The method to get the details Returns: dict: An instance of dict """ return self.__details def set_details(self, details): """ The method to set the value to details Parameters: details (dict) : An instance of dict """ if details is not None and not isinstance(details, dict): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: details EXPECTED TYPE: dict', None, None) self.__details = details self.__key_modified['details'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/record/success_response.py
success_response.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants from zcrmsdk.src.com.zoho.crm.api.record.record import Record except Exception: from ..exception import SDKException from ..util import Constants from .record import Record class PricingDetails(Record): def __init__(self): """Creates an instance of PricingDetails""" super().__init__() def get_to_range(self): """ The method to get the to_range Returns: float: A float representing the to_range """ return self.get_key_value('to_range') def set_to_range(self, to_range): """ The method to set the value to to_range Parameters: to_range (float) : A float representing the to_range """ if to_range is not None and not isinstance(to_range, float): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: to_range EXPECTED TYPE: float', None, None) self.add_key_value('to_range', to_range) def get_discount(self): """ The method to get the discount Returns: float: A float representing the discount """ return self.get_key_value('discount') def set_discount(self, discount): """ The method to set the value to discount Parameters: discount (float) : A float representing the discount """ if discount is not None and not isinstance(discount, float): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: discount EXPECTED TYPE: float', None, None) self.add_key_value('discount', discount) def get_from_range(self): """ The method to get the from_range Returns: float: A float representing the from_range """ return self.get_key_value('from_range') def set_from_range(self, from_range): """ The method to set the value to from_range Parameters: from_range (float) : A float representing the from_range """ if from_range is not None and not isinstance(from_range, float): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: from_range EXPECTED TYPE: float', None, None) self.add_key_value('from_range', from_range)
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/record/pricing_details.py
pricing_details.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants except Exception: from ..exception import SDKException from ..util import Constants class MassUpdateTerritory(object): def __init__(self): """Creates an instance of MassUpdateTerritory""" self.__id = None self.__include_child = None self.__key_modified = dict() def get_id(self): """ The method to get the id Returns: int: An int representing the id """ return self.__id def set_id(self, id): """ The method to set the value to id Parameters: id (int) : An int representing the id """ if id is not None and not isinstance(id, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: int', None, None) self.__id = id self.__key_modified['id'] = 1 def get_include_child(self): """ The method to get the include_child Returns: bool: A bool representing the include_child """ return self.__include_child def set_include_child(self, include_child): """ The method to set the value to include_child Parameters: include_child (bool) : A bool representing the include_child """ if include_child is not None and not isinstance(include_child, bool): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: include_child EXPECTED TYPE: bool', None, None) self.__include_child = include_child self.__key_modified['include_child'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/record/mass_update_territory.py
mass_update_territory.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants except Exception: from ..exception import SDKException from ..util import Constants class MultiSelectLookup(object): def __init__(self): """Creates an instance of MultiSelectLookup""" self.__id = None self.__fieldname = None self.__has_more = None self.__key_modified = dict() def get_id(self): """ The method to get the id Returns: int: An int representing the id """ return self.__id def set_id(self, id): """ The method to set the value to id Parameters: id (int) : An int representing the id """ if id is not None and not isinstance(id, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: int', None, None) self.__id = id self.__key_modified['id'] = 1 def get_fieldname(self): """ The method to get the fieldname Returns: dict: An instance of dict """ return self.__fieldname def set_fieldname(self, fieldname): """ The method to set the value to fieldname Parameters: fieldname (dict) : An instance of dict """ if fieldname is not None and not isinstance(fieldname, dict): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: fieldname EXPECTED TYPE: dict', None, None) self.__fieldname = fieldname self.__key_modified['fieldName'] = 1 def get_has_more(self): """ The method to get the has_more Returns: dict: An instance of dict """ return self.__has_more def set_has_more(self, has_more): """ The method to set the value to has_more Parameters: has_more (dict) : An instance of dict """ if has_more is not None and not isinstance(has_more, dict): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: has_more EXPECTED TYPE: dict', None, None) self.__has_more = has_more self.__key_modified['$has_more'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/record/multi_select_lookup.py
multi_select_lookup.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants from zcrmsdk.src.com.zoho.crm.api.related_lists.response_handler import ResponseHandler except Exception: from ..exception import SDKException from ..util import Constants from .response_handler import ResponseHandler class ResponseWrapper(ResponseHandler): def __init__(self): """Creates an instance of ResponseWrapper""" super().__init__() self.__related_lists = None self.__key_modified = dict() def get_related_lists(self): """ The method to get the related_lists Returns: list: An instance of list """ return self.__related_lists def set_related_lists(self, related_lists): """ The method to set the value to related_lists Parameters: related_lists (list) : An instance of list """ if related_lists is not None and not isinstance(related_lists, list): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: related_lists EXPECTED TYPE: list', None, None) self.__related_lists = related_lists self.__key_modified['related_lists'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/related_lists/response_wrapper.py
response_wrapper.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Choice, Constants from zcrmsdk.src.com.zoho.crm.api.related_lists.response_handler import ResponseHandler except Exception: from ..exception import SDKException from ..util import Choice, Constants from .response_handler import ResponseHandler class APIException(ResponseHandler): def __init__(self): """Creates an instance of APIException""" super().__init__() self.__status = None self.__code = None self.__message = None self.__details = None self.__key_modified = dict() def get_status(self): """ The method to get the status Returns: Choice: An instance of Choice """ return self.__status def set_status(self, status): """ The method to set the value to status Parameters: status (Choice) : An instance of Choice """ if status is not None and not isinstance(status, Choice): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: status EXPECTED TYPE: Choice', None, None) self.__status = status self.__key_modified['status'] = 1 def get_code(self): """ The method to get the code Returns: Choice: An instance of Choice """ return self.__code def set_code(self, code): """ The method to set the value to code Parameters: code (Choice) : An instance of Choice """ if code is not None and not isinstance(code, Choice): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: code EXPECTED TYPE: Choice', None, None) self.__code = code self.__key_modified['code'] = 1 def get_message(self): """ The method to get the message Returns: Choice: An instance of Choice """ return self.__message def set_message(self, message): """ The method to set the value to message Parameters: message (Choice) : An instance of Choice """ if message is not None and not isinstance(message, Choice): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: message EXPECTED TYPE: Choice', None, None) self.__message = message self.__key_modified['message'] = 1 def get_details(self): """ The method to get the details Returns: dict: An instance of dict """ return self.__details def set_details(self, details): """ The method to set the value to details Parameters: details (dict) : An instance of dict """ if details is not None and not isinstance(details, dict): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: details EXPECTED TYPE: dict', None, None) self.__details = details self.__key_modified['details'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/related_lists/api_exception.py
api_exception.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants except Exception: from ..exception import SDKException from ..util import Constants class RelatedList(object): def __init__(self): """Creates an instance of RelatedList""" self.__id = None self.__sequence_number = None self.__display_label = None self.__api_name = None self.__module = None self.__name = None self.__action = None self.__href = None self.__type = None self.__connectedmodule = None self.__linkingmodule = None self.__key_modified = dict() def get_id(self): """ The method to get the id Returns: int: An int representing the id """ return self.__id def set_id(self, id): """ The method to set the value to id Parameters: id (int) : An int representing the id """ if id is not None and not isinstance(id, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: int', None, None) self.__id = id self.__key_modified['id'] = 1 def get_sequence_number(self): """ The method to get the sequence_number Returns: string: A string representing the sequence_number """ return self.__sequence_number def set_sequence_number(self, sequence_number): """ The method to set the value to sequence_number Parameters: sequence_number (string) : A string representing the sequence_number """ if sequence_number is not None and not isinstance(sequence_number, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: sequence_number EXPECTED TYPE: str', None, None) self.__sequence_number = sequence_number self.__key_modified['sequence_number'] = 1 def get_display_label(self): """ The method to get the display_label Returns: string: A string representing the display_label """ return self.__display_label def set_display_label(self, display_label): """ The method to set the value to display_label Parameters: display_label (string) : A string representing the display_label """ if display_label is not None and not isinstance(display_label, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: display_label EXPECTED TYPE: str', None, None) self.__display_label = display_label self.__key_modified['display_label'] = 1 def get_api_name(self): """ The method to get the api_name Returns: string: A string representing the api_name """ return self.__api_name def set_api_name(self, api_name): """ The method to set the value to api_name Parameters: api_name (string) : A string representing the api_name """ if api_name is not None and not isinstance(api_name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: api_name EXPECTED TYPE: str', None, None) self.__api_name = api_name self.__key_modified['api_name'] = 1 def get_module(self): """ The method to get the module Returns: string: A string representing the module """ return self.__module def set_module(self, module): """ The method to set the value to module Parameters: module (string) : A string representing the module """ if module is not None and not isinstance(module, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: module EXPECTED TYPE: str', None, None) self.__module = module self.__key_modified['module'] = 1 def get_name(self): """ The method to get the name Returns: string: A string representing the name """ return self.__name def set_name(self, name): """ The method to set the value to name Parameters: name (string) : A string representing the name """ if name is not None and not isinstance(name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: name EXPECTED TYPE: str', None, None) self.__name = name self.__key_modified['name'] = 1 def get_action(self): """ The method to get the action Returns: string: A string representing the action """ return self.__action def set_action(self, action): """ The method to set the value to action Parameters: action (string) : A string representing the action """ if action is not None and not isinstance(action, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: action EXPECTED TYPE: str', None, None) self.__action = action self.__key_modified['action'] = 1 def get_href(self): """ The method to get the href Returns: string: A string representing the href """ return self.__href def set_href(self, href): """ The method to set the value to href Parameters: href (string) : A string representing the href """ if href is not None and not isinstance(href, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: href EXPECTED TYPE: str', None, None) self.__href = href self.__key_modified['href'] = 1 def get_type(self): """ The method to get the type Returns: string: A string representing the type """ return self.__type def set_type(self, type): """ The method to set the value to type Parameters: type (string) : A string representing the type """ if type is not None and not isinstance(type, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: type EXPECTED TYPE: str', None, None) self.__type = type self.__key_modified['type'] = 1 def get_connectedmodule(self): """ The method to get the connectedmodule Returns: string: A string representing the connectedmodule """ return self.__connectedmodule def set_connectedmodule(self, connectedmodule): """ The method to set the value to connectedmodule Parameters: connectedmodule (string) : A string representing the connectedmodule """ if connectedmodule is not None and not isinstance(connectedmodule, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: connectedmodule EXPECTED TYPE: str', None, None) self.__connectedmodule = connectedmodule self.__key_modified['connectedmodule'] = 1 def get_linkingmodule(self): """ The method to get the linkingmodule Returns: string: A string representing the linkingmodule """ return self.__linkingmodule def set_linkingmodule(self, linkingmodule): """ The method to set the value to linkingmodule Parameters: linkingmodule (string) : A string representing the linkingmodule """ if linkingmodule is not None and not isinstance(linkingmodule, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: linkingmodule EXPECTED TYPE: str', None, None) self.__linkingmodule = linkingmodule self.__key_modified['linkingmodule'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/related_lists/related_list.py
related_list.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import APIResponse, CommonAPIHandler, Constants from zcrmsdk.src.com.zoho.crm.api.param import Param except Exception: from ..exception import SDKException from ..util import APIResponse, CommonAPIHandler, Constants from ..param import Param class RelatedListsOperations(object): def __init__(self, module=None): """ Creates an instance of RelatedListsOperations with the given parameters Parameters: module (string) : A string representing the module """ if module is not None and not isinstance(module, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: module EXPECTED TYPE: str', None, None) self.__module = module def get_related_lists(self): """ The method to get related lists Returns: APIResponse: An instance of APIResponse Raises: SDKException """ handler_instance = CommonAPIHandler() api_path = '' api_path = api_path + '/crm/v2.1/settings/related_lists' handler_instance.set_api_path(api_path) handler_instance.set_http_method(Constants.REQUEST_METHOD_GET) handler_instance.set_category_method(Constants.REQUEST_CATEGORY_READ) handler_instance.add_param(Param('module', 'com.zoho.crm.api.RelatedLists.GetRelatedListsParam'), self.__module) try: from zcrmsdk.src.com.zoho.crm.api.related_lists.response_handler import ResponseHandler except Exception: from .response_handler import ResponseHandler return handler_instance.api_call(ResponseHandler.__module__, 'application/json') def get_related_list(self, id): """ The method to get related list Parameters: id (int) : An int representing the id Returns: APIResponse: An instance of APIResponse Raises: SDKException """ if not isinstance(id, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: int', None, None) handler_instance = CommonAPIHandler() api_path = '' api_path = api_path + '/crm/v2.1/settings/related_lists/' api_path = api_path + str(id) handler_instance.set_api_path(api_path) handler_instance.set_http_method(Constants.REQUEST_METHOD_GET) handler_instance.set_category_method(Constants.REQUEST_CATEGORY_READ) handler_instance.add_param(Param('module', 'com.zoho.crm.api.RelatedLists.GetRelatedListParam'), self.__module) try: from zcrmsdk.src.com.zoho.crm.api.related_lists.response_handler import ResponseHandler except Exception: from .response_handler import ResponseHandler return handler_instance.api_call(ResponseHandler.__module__, 'application/json') class GetRelatedListsParam(object): pass class GetRelatedListParam(object): pass
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/related_lists/related_lists_operations.py
related_lists_operations.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants from zcrmsdk.src.com.zoho.crm.api.wizards.response_handler import ResponseHandler except Exception: from ..exception import SDKException from ..util import Constants from .response_handler import ResponseHandler class ResponseWrapper(ResponseHandler): def __init__(self): """Creates an instance of ResponseWrapper""" super().__init__() self.__wizards = None self.__key_modified = dict() def get_wizards(self): """ The method to get the wizards Returns: list: An instance of list """ return self.__wizards def set_wizards(self, wizards): """ The method to set the value to wizards Parameters: wizards (list) : An instance of list """ if wizards is not None and not isinstance(wizards, list): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: wizards EXPECTED TYPE: list', None, None) self.__wizards = wizards self.__key_modified['wizards'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/wizards/response_wrapper.py
response_wrapper.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants except Exception: from ..exception import SDKException from ..util import Constants class Button(object): def __init__(self): """Creates an instance of Button""" self.__id = None self.__sequence_number = None self.__display_label = None self.__criteria = None self.__target_screen = None self.__type = None self.__color = None self.__shape = None self.__background_color = None self.__visibility = None self.__transition = None self.__key_modified = dict() def get_id(self): """ The method to get the id Returns: int: An int representing the id """ return self.__id def set_id(self, id): """ The method to set the value to id Parameters: id (int) : An int representing the id """ if id is not None and not isinstance(id, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: int', None, None) self.__id = id self.__key_modified['id'] = 1 def get_sequence_number(self): """ The method to get the sequence_number Returns: int: An int representing the sequence_number """ return self.__sequence_number def set_sequence_number(self, sequence_number): """ The method to set the value to sequence_number Parameters: sequence_number (int) : An int representing the sequence_number """ if sequence_number is not None and not isinstance(sequence_number, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: sequence_number EXPECTED TYPE: int', None, None) self.__sequence_number = sequence_number self.__key_modified['sequence_number'] = 1 def get_display_label(self): """ The method to get the display_label Returns: string: A string representing the display_label """ return self.__display_label def set_display_label(self, display_label): """ The method to set the value to display_label Parameters: display_label (string) : A string representing the display_label """ if display_label is not None and not isinstance(display_label, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: display_label EXPECTED TYPE: str', None, None) self.__display_label = display_label self.__key_modified['display_label'] = 1 def get_criteria(self): """ The method to get the criteria Returns: Criteria: An instance of Criteria """ return self.__criteria def set_criteria(self, criteria): """ The method to set the value to criteria Parameters: criteria (Criteria) : An instance of Criteria """ try: from zcrmsdk.src.com.zoho.crm.api.customviews import Criteria except Exception: from ..custom_views import Criteria if criteria is not None and not isinstance(criteria, Criteria): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: criteria EXPECTED TYPE: Criteria', None, None) self.__criteria = criteria self.__key_modified['criteria'] = 1 def get_target_screen(self): """ The method to get the target_screen Returns: Screen: An instance of Screen """ return self.__target_screen def set_target_screen(self, target_screen): """ The method to set the value to target_screen Parameters: target_screen (Screen) : An instance of Screen """ try: from zcrmsdk.src.com.zoho.crm.api.wizards.screen import Screen except Exception: from .screen import Screen if target_screen is not None and not isinstance(target_screen, Screen): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: target_screen EXPECTED TYPE: Screen', None, None) self.__target_screen = target_screen self.__key_modified['target_screen'] = 1 def get_type(self): """ The method to get the type Returns: string: A string representing the type """ return self.__type def set_type(self, type): """ The method to set the value to type Parameters: type (string) : A string representing the type """ if type is not None and not isinstance(type, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: type EXPECTED TYPE: str', None, None) self.__type = type self.__key_modified['type'] = 1 def get_color(self): """ The method to get the color Returns: string: A string representing the color """ return self.__color def set_color(self, color): """ The method to set the value to color Parameters: color (string) : A string representing the color """ if color is not None and not isinstance(color, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: color EXPECTED TYPE: str', None, None) self.__color = color self.__key_modified['color'] = 1 def get_shape(self): """ The method to get the shape Returns: string: A string representing the shape """ return self.__shape def set_shape(self, shape): """ The method to set the value to shape Parameters: shape (string) : A string representing the shape """ if shape is not None and not isinstance(shape, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: shape EXPECTED TYPE: str', None, None) self.__shape = shape self.__key_modified['shape'] = 1 def get_background_color(self): """ The method to get the background_color Returns: string: A string representing the background_color """ return self.__background_color def set_background_color(self, background_color): """ The method to set the value to background_color Parameters: background_color (string) : A string representing the background_color """ if background_color is not None and not isinstance(background_color, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: background_color EXPECTED TYPE: str', None, None) self.__background_color = background_color self.__key_modified['background_color'] = 1 def get_visibility(self): """ The method to get the visibility Returns: string: A string representing the visibility """ return self.__visibility def set_visibility(self, visibility): """ The method to set the value to visibility Parameters: visibility (string) : A string representing the visibility """ if visibility is not None and not isinstance(visibility, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: visibility EXPECTED TYPE: str', None, None) self.__visibility = visibility self.__key_modified['visibility'] = 1 def get_transition(self): """ The method to get the transition Returns: Transition: An instance of Transition """ return self.__transition def set_transition(self, transition): """ The method to set the value to transition Parameters: transition (Transition) : An instance of Transition """ try: from zcrmsdk.src.com.zoho.crm.api.wizards.transition import Transition except Exception: from .transition import Transition if transition is not None and not isinstance(transition, Transition): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: transition EXPECTED TYPE: Transition', None, None) self.__transition = transition self.__key_modified['transition'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/wizards/button.py
button.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.parameter_map import ParameterMap from zcrmsdk.src.com.zoho.crm.api.util import APIResponse, CommonAPIHandler, Constants from zcrmsdk.src.com.zoho.crm.api.param import Param except Exception: from ..exception import SDKException from ..parameter_map import ParameterMap from ..util import APIResponse, CommonAPIHandler, Constants from ..param import Param class WizardsOperations(object): def __init__(self): """Creates an instance of WizardsOperations""" pass def get_wizards(self): """ The method to get wizards Returns: APIResponse: An instance of APIResponse Raises: SDKException """ handler_instance = CommonAPIHandler() api_path = '' api_path = api_path + '/crm/v2.1/settings/wizards' handler_instance.set_api_path(api_path) handler_instance.set_http_method(Constants.REQUEST_METHOD_GET) handler_instance.set_category_method(Constants.REQUEST_CATEGORY_READ) try: from zcrmsdk.src.com.zoho.crm.api.wizards.response_handler import ResponseHandler except Exception: from .response_handler import ResponseHandler return handler_instance.api_call(ResponseHandler.__module__, 'application/json') def get_wizard_by_id(self, wizard_id, param_instance=None): """ The method to get wizard by id Parameters: wizard_id (int) : An int representing the wizard_id param_instance (ParameterMap) : An instance of ParameterMap Returns: APIResponse: An instance of APIResponse Raises: SDKException """ if not isinstance(wizard_id, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: wizard_id EXPECTED TYPE: int', None, None) if param_instance is not None and not isinstance(param_instance, ParameterMap): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: param_instance EXPECTED TYPE: ParameterMap', None, None) handler_instance = CommonAPIHandler() api_path = '' api_path = api_path + '/crm/v2.1/settings/wizards/' api_path = api_path + str(wizard_id) handler_instance.set_api_path(api_path) handler_instance.set_http_method(Constants.REQUEST_METHOD_GET) handler_instance.set_category_method(Constants.REQUEST_CATEGORY_READ) handler_instance.set_param(param_instance) try: from zcrmsdk.src.com.zoho.crm.api.wizards.response_handler import ResponseHandler except Exception: from .response_handler import ResponseHandler return handler_instance.api_call(ResponseHandler.__module__, 'application/json') class GetWizardbyIDParam(object): layout_id = Param('layout_id', 'com.zoho.crm.api.Wizards.GetWizardbyIDParam')
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/wizards/wizards_operations.py
wizards_operations.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants except Exception: from ..exception import SDKException from ..util import Constants class Node(object): def __init__(self): """Creates an instance of Node""" self.__pos_y = None self.__pos_x = None self.__start_node = None self.__screen = None self.__key_modified = dict() def get_pos_y(self): """ The method to get the pos_y Returns: int: An int representing the pos_y """ return self.__pos_y def set_pos_y(self, pos_y): """ The method to set the value to pos_y Parameters: pos_y (int) : An int representing the pos_y """ if pos_y is not None and not isinstance(pos_y, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: pos_y EXPECTED TYPE: int', None, None) self.__pos_y = pos_y self.__key_modified['pos_y'] = 1 def get_pos_x(self): """ The method to get the pos_x Returns: int: An int representing the pos_x """ return self.__pos_x def set_pos_x(self, pos_x): """ The method to set the value to pos_x Parameters: pos_x (int) : An int representing the pos_x """ if pos_x is not None and not isinstance(pos_x, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: pos_x EXPECTED TYPE: int', None, None) self.__pos_x = pos_x self.__key_modified['pos_x'] = 1 def get_start_node(self): """ The method to get the start_node Returns: bool: A bool representing the start_node """ return self.__start_node def set_start_node(self, start_node): """ The method to set the value to start_node Parameters: start_node (bool) : A bool representing the start_node """ if start_node is not None and not isinstance(start_node, bool): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: start_node EXPECTED TYPE: bool', None, None) self.__start_node = start_node self.__key_modified['start_node'] = 1 def get_screen(self): """ The method to get the screen Returns: Screen: An instance of Screen """ return self.__screen def set_screen(self, screen): """ The method to set the value to screen Parameters: screen (Screen) : An instance of Screen """ try: from zcrmsdk.src.com.zoho.crm.api.wizards.screen import Screen except Exception: from .screen import Screen if screen is not None and not isinstance(screen, Screen): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: screen EXPECTED TYPE: Screen', None, None) self.__screen = screen self.__key_modified['screen'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/wizards/node.py
node.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants except Exception: from ..exception import SDKException from ..util import Constants class Wizard(object): def __init__(self): """Creates an instance of Wizard""" self.__created_time = None self.__modified_time = None self.__module = None self.__name = None self.__modified_by = None self.__profiles = None self.__active = None self.__containers = None self.__created_by = None self.__parent_wizard = None self.__draft = None self.__id = None self.__key_modified = dict() def get_created_time(self): """ The method to get the created_time Returns: datetime: An instance of datetime """ return self.__created_time def set_created_time(self, created_time): """ The method to set the value to created_time Parameters: created_time (datetime) : An instance of datetime """ from datetime import datetime if created_time is not None and not isinstance(created_time, datetime): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: created_time EXPECTED TYPE: datetime', None, None) self.__created_time = created_time self.__key_modified['created_time'] = 1 def get_modified_time(self): """ The method to get the modified_time Returns: datetime: An instance of datetime """ return self.__modified_time def set_modified_time(self, modified_time): """ The method to set the value to modified_time Parameters: modified_time (datetime) : An instance of datetime """ from datetime import datetime if modified_time is not None and not isinstance(modified_time, datetime): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modified_time EXPECTED TYPE: datetime', None, None) self.__modified_time = modified_time self.__key_modified['modified_time'] = 1 def get_module(self): """ The method to get the module Returns: Module: An instance of Module """ return self.__module def set_module(self, module): """ The method to set the value to module Parameters: module (Module) : An instance of Module """ try: from zcrmsdk.src.com.zoho.crm.api.modules import Module except Exception: from ..modules import Module if module is not None and not isinstance(module, Module): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: module EXPECTED TYPE: Module', None, None) self.__module = module self.__key_modified['module'] = 1 def get_name(self): """ The method to get the name Returns: string: A string representing the name """ return self.__name def set_name(self, name): """ The method to set the value to name Parameters: name (string) : A string representing the name """ if name is not None and not isinstance(name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: name EXPECTED TYPE: str', None, None) self.__name = name self.__key_modified['name'] = 1 def get_modified_by(self): """ The method to get the modified_by Returns: User: An instance of User """ return self.__modified_by def set_modified_by(self, modified_by): """ The method to set the value to modified_by Parameters: modified_by (User) : An instance of User """ try: from zcrmsdk.src.com.zoho.crm.api.users import User except Exception: from ..users import User if modified_by is not None and not isinstance(modified_by, User): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modified_by EXPECTED TYPE: User', None, None) self.__modified_by = modified_by self.__key_modified['modified_by'] = 1 def get_profiles(self): """ The method to get the profiles Returns: list: An instance of list """ return self.__profiles def set_profiles(self, profiles): """ The method to set the value to profiles Parameters: profiles (list) : An instance of list """ if profiles is not None and not isinstance(profiles, list): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: profiles EXPECTED TYPE: list', None, None) self.__profiles = profiles self.__key_modified['profiles'] = 1 def get_active(self): """ The method to get the active Returns: bool: A bool representing the active """ return self.__active def set_active(self, active): """ The method to set the value to active Parameters: active (bool) : A bool representing the active """ if active is not None and not isinstance(active, bool): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: active EXPECTED TYPE: bool', None, None) self.__active = active self.__key_modified['active'] = 1 def get_containers(self): """ The method to get the containers Returns: list: An instance of list """ return self.__containers def set_containers(self, containers): """ The method to set the value to containers Parameters: containers (list) : An instance of list """ if containers is not None and not isinstance(containers, list): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: containers EXPECTED TYPE: list', None, None) self.__containers = containers self.__key_modified['containers'] = 1 def get_created_by(self): """ The method to get the created_by Returns: User: An instance of User """ return self.__created_by def set_created_by(self, created_by): """ The method to set the value to created_by Parameters: created_by (User) : An instance of User """ try: from zcrmsdk.src.com.zoho.crm.api.users import User except Exception: from ..users import User if created_by is not None and not isinstance(created_by, User): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: created_by EXPECTED TYPE: User', None, None) self.__created_by = created_by self.__key_modified['created_by'] = 1 def get_parent_wizard(self): """ The method to get the parent_wizard Returns: Wizard: An instance of Wizard """ return self.__parent_wizard def set_parent_wizard(self, parent_wizard): """ The method to set the value to parent_wizard Parameters: parent_wizard (Wizard) : An instance of Wizard """ try: from zcrmsdk.src.com.zoho.crm.api.wizards.wizard import Wizard except Exception: from .wizard import Wizard if parent_wizard is not None and not isinstance(parent_wizard, Wizard): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: parent_wizard EXPECTED TYPE: Wizard', None, None) self.__parent_wizard = parent_wizard self.__key_modified['parent_wizard'] = 1 def get_draft(self): """ The method to get the draft Returns: bool: A bool representing the draft """ return self.__draft def set_draft(self, draft): """ The method to set the value to draft Parameters: draft (bool) : A bool representing the draft """ if draft is not None and not isinstance(draft, bool): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: draft EXPECTED TYPE: bool', None, None) self.__draft = draft self.__key_modified['draft'] = 1 def get_id(self): """ The method to get the id Returns: int: An int representing the id """ return self.__id def set_id(self, id): """ The method to set the value to id Parameters: id (int) : An int representing the id """ if id is not None and not isinstance(id, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: int', None, None) self.__id = id self.__key_modified['id'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/wizards/wizard.py
wizard.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Choice, Constants from zcrmsdk.src.com.zoho.crm.api.wizards.response_handler import ResponseHandler except Exception: from ..exception import SDKException from ..util import Choice, Constants from .response_handler import ResponseHandler class APIException(ResponseHandler): def __init__(self): """Creates an instance of APIException""" super().__init__() self.__code = None self.__status = None self.__message = None self.__details = None self.__key_modified = dict() def get_code(self): """ The method to get the code Returns: Choice: An instance of Choice """ return self.__code def set_code(self, code): """ The method to set the value to code Parameters: code (Choice) : An instance of Choice """ if code is not None and not isinstance(code, Choice): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: code EXPECTED TYPE: Choice', None, None) self.__code = code self.__key_modified['code'] = 1 def get_status(self): """ The method to get the status Returns: Choice: An instance of Choice """ return self.__status def set_status(self, status): """ The method to set the value to status Parameters: status (Choice) : An instance of Choice """ if status is not None and not isinstance(status, Choice): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: status EXPECTED TYPE: Choice', None, None) self.__status = status self.__key_modified['status'] = 1 def get_message(self): """ The method to get the message Returns: Choice: An instance of Choice """ return self.__message def set_message(self, message): """ The method to set the value to message Parameters: message (Choice) : An instance of Choice """ if message is not None and not isinstance(message, Choice): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: message EXPECTED TYPE: Choice', None, None) self.__message = message self.__key_modified['message'] = 1 def get_details(self): """ The method to get the details Returns: dict: An instance of dict """ return self.__details def set_details(self, details): """ The method to set the value to details Parameters: details (dict) : An instance of dict """ if details is not None and not isinstance(details, dict): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: details EXPECTED TYPE: dict', None, None) self.__details = details self.__key_modified['details'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/wizards/api_exception.py
api_exception.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants except Exception: from ..exception import SDKException from ..util import Constants class Screen(object): def __init__(self): """Creates an instance of Screen""" self.__id = None self.__display_label = None self.__segments = None self.__key_modified = dict() def get_id(self): """ The method to get the id Returns: int: An int representing the id """ return self.__id def set_id(self, id): """ The method to set the value to id Parameters: id (int) : An int representing the id """ if id is not None and not isinstance(id, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: int', None, None) self.__id = id self.__key_modified['id'] = 1 def get_display_label(self): """ The method to get the display_label Returns: string: A string representing the display_label """ return self.__display_label def set_display_label(self, display_label): """ The method to set the value to display_label Parameters: display_label (string) : A string representing the display_label """ if display_label is not None and not isinstance(display_label, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: display_label EXPECTED TYPE: str', None, None) self.__display_label = display_label self.__key_modified['display_label'] = 1 def get_segments(self): """ The method to get the segments Returns: list: An instance of list """ return self.__segments def set_segments(self, segments): """ The method to set the value to segments Parameters: segments (list) : An instance of list """ if segments is not None and not isinstance(segments, list): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: segments EXPECTED TYPE: list', None, None) self.__segments = segments self.__key_modified['segments'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/wizards/screen.py
screen.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants except Exception: from ..exception import SDKException from ..util import Constants class Connection(object): def __init__(self): """Creates an instance of Connection""" self.__source_button = None self.__target_screen = None self.__key_modified = dict() def get_source_button(self): """ The method to get the source_button Returns: Button: An instance of Button """ return self.__source_button def set_source_button(self, source_button): """ The method to set the value to source_button Parameters: source_button (Button) : An instance of Button """ try: from zcrmsdk.src.com.zoho.crm.api.wizards.button import Button except Exception: from .button import Button if source_button is not None and not isinstance(source_button, Button): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: source_button EXPECTED TYPE: Button', None, None) self.__source_button = source_button self.__key_modified['source_button'] = 1 def get_target_screen(self): """ The method to get the target_screen Returns: Screen: An instance of Screen """ return self.__target_screen def set_target_screen(self, target_screen): """ The method to set the value to target_screen Parameters: target_screen (Screen) : An instance of Screen """ try: from zcrmsdk.src.com.zoho.crm.api.wizards.screen import Screen except Exception: from .screen import Screen if target_screen is not None and not isinstance(target_screen, Screen): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: target_screen EXPECTED TYPE: Screen', None, None) self.__target_screen = target_screen self.__key_modified['target_screen'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/wizards/connection.py
connection.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants except Exception: from ..exception import SDKException from ..util import Constants class Container(object): def __init__(self): """Creates an instance of Container""" self.__id = None self.__layout = None self.__chart_data = None self.__screens = None self.__key_modified = dict() def get_id(self): """ The method to get the id Returns: int: An int representing the id """ return self.__id def set_id(self, id): """ The method to set the value to id Parameters: id (int) : An int representing the id """ if id is not None and not isinstance(id, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: int', None, None) self.__id = id self.__key_modified['id'] = 1 def get_layout(self): """ The method to get the layout Returns: Layout: An instance of Layout """ return self.__layout def set_layout(self, layout): """ The method to set the value to layout Parameters: layout (Layout) : An instance of Layout """ try: from zcrmsdk.src.com.zoho.crm.api.layouts import Layout except Exception: from ..layouts import Layout if layout is not None and not isinstance(layout, Layout): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: layout EXPECTED TYPE: Layout', None, None) self.__layout = layout self.__key_modified['layout'] = 1 def get_chart_data(self): """ The method to get the chart_data Returns: ChartData: An instance of ChartData """ return self.__chart_data def set_chart_data(self, chart_data): """ The method to set the value to chart_data Parameters: chart_data (ChartData) : An instance of ChartData """ try: from zcrmsdk.src.com.zoho.crm.api.wizards.chart_data import ChartData except Exception: from .chart_data import ChartData if chart_data is not None and not isinstance(chart_data, ChartData): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: chart_data EXPECTED TYPE: ChartData', None, None) self.__chart_data = chart_data self.__key_modified['chart_data'] = 1 def get_screens(self): """ The method to get the screens Returns: list: An instance of list """ return self.__screens def set_screens(self, screens): """ The method to set the value to screens Parameters: screens (list) : An instance of list """ if screens is not None and not isinstance(screens, list): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: screens EXPECTED TYPE: list', None, None) self.__screens = screens self.__key_modified['screens'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/wizards/container.py
container.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants except Exception: from ..exception import SDKException from ..util import Constants class Transition(object): def __init__(self): """Creates an instance of Transition""" self.__id = None self.__name = None self.__key_modified = dict() def get_id(self): """ The method to get the id Returns: int: An int representing the id """ return self.__id def set_id(self, id): """ The method to set the value to id Parameters: id (int) : An int representing the id """ if id is not None and not isinstance(id, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: int', None, None) self.__id = id self.__key_modified['id'] = 1 def get_name(self): """ The method to get the name Returns: string: A string representing the name """ return self.__name def set_name(self, name): """ The method to set the value to name Parameters: name (string) : A string representing the name """ if name is not None and not isinstance(name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: name EXPECTED TYPE: str', None, None) self.__name = name self.__key_modified['name'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/wizards/transition.py
transition.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants except Exception: from ..exception import SDKException from ..util import Constants class Segment(object): def __init__(self): """Creates an instance of Segment""" self.__id = None self.__sequence_number = None self.__display_label = None self.__type = None self.__column_count = None self.__fields = None self.__buttons = None self.__key_modified = dict() def get_id(self): """ The method to get the id Returns: int: An int representing the id """ return self.__id def set_id(self, id): """ The method to set the value to id Parameters: id (int) : An int representing the id """ if id is not None and not isinstance(id, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: int', None, None) self.__id = id self.__key_modified['id'] = 1 def get_sequence_number(self): """ The method to get the sequence_number Returns: int: An int representing the sequence_number """ return self.__sequence_number def set_sequence_number(self, sequence_number): """ The method to set the value to sequence_number Parameters: sequence_number (int) : An int representing the sequence_number """ if sequence_number is not None and not isinstance(sequence_number, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: sequence_number EXPECTED TYPE: int', None, None) self.__sequence_number = sequence_number self.__key_modified['sequence_number'] = 1 def get_display_label(self): """ The method to get the display_label Returns: string: A string representing the display_label """ return self.__display_label def set_display_label(self, display_label): """ The method to set the value to display_label Parameters: display_label (string) : A string representing the display_label """ if display_label is not None and not isinstance(display_label, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: display_label EXPECTED TYPE: str', None, None) self.__display_label = display_label self.__key_modified['display_label'] = 1 def get_type(self): """ The method to get the type Returns: string: A string representing the type """ return self.__type def set_type(self, type): """ The method to set the value to type Parameters: type (string) : A string representing the type """ if type is not None and not isinstance(type, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: type EXPECTED TYPE: str', None, None) self.__type = type self.__key_modified['type'] = 1 def get_column_count(self): """ The method to get the column_count Returns: int: An int representing the column_count """ return self.__column_count def set_column_count(self, column_count): """ The method to set the value to column_count Parameters: column_count (int) : An int representing the column_count """ if column_count is not None and not isinstance(column_count, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: column_count EXPECTED TYPE: int', None, None) self.__column_count = column_count self.__key_modified['column_count'] = 1 def get_fields(self): """ The method to get the fields Returns: list: An instance of list """ return self.__fields def set_fields(self, fields): """ The method to set the value to fields Parameters: fields (list) : An instance of list """ if fields is not None and not isinstance(fields, list): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: fields EXPECTED TYPE: list', None, None) self.__fields = fields self.__key_modified['fields'] = 1 def get_buttons(self): """ The method to get the buttons Returns: list: An instance of list """ return self.__buttons def set_buttons(self, buttons): """ The method to set the value to buttons Parameters: buttons (list) : An instance of list """ if buttons is not None and not isinstance(buttons, list): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: buttons EXPECTED TYPE: list', None, None) self.__buttons = buttons self.__key_modified['buttons'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/wizards/segment.py
segment.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants except Exception: from ..exception import SDKException from ..util import Constants class ChartData(object): def __init__(self): """Creates an instance of ChartData""" self.__nodes = None self.__connections = None self.__canvas_width = None self.__canvas_height = None self.__key_modified = dict() def get_nodes(self): """ The method to get the nodes Returns: list: An instance of list """ return self.__nodes def set_nodes(self, nodes): """ The method to set the value to nodes Parameters: nodes (list) : An instance of list """ if nodes is not None and not isinstance(nodes, list): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: nodes EXPECTED TYPE: list', None, None) self.__nodes = nodes self.__key_modified['nodes'] = 1 def get_connections(self): """ The method to get the connections Returns: list: An instance of list """ return self.__connections def set_connections(self, connections): """ The method to set the value to connections Parameters: connections (list) : An instance of list """ if connections is not None and not isinstance(connections, list): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: connections EXPECTED TYPE: list', None, None) self.__connections = connections self.__key_modified['connections'] = 1 def get_canvas_width(self): """ The method to get the canvas_width Returns: int: An int representing the canvas_width """ return self.__canvas_width def set_canvas_width(self, canvas_width): """ The method to set the value to canvas_width Parameters: canvas_width (int) : An int representing the canvas_width """ if canvas_width is not None and not isinstance(canvas_width, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: canvas_width EXPECTED TYPE: int', None, None) self.__canvas_width = canvas_width self.__key_modified['canvas_width'] = 1 def get_canvas_height(self): """ The method to get the canvas_height Returns: int: An int representing the canvas_height """ return self.__canvas_height def set_canvas_height(self, canvas_height): """ The method to set the value to canvas_height Parameters: canvas_height (int) : An int representing the canvas_height """ if canvas_height is not None and not isinstance(canvas_height, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: canvas_height EXPECTED TYPE: int', None, None) self.__canvas_height = canvas_height self.__key_modified['canvas_height'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/wizards/chart_data.py
chart_data.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Choice, Constants except Exception: from ..exception import SDKException from ..util import Choice, Constants class Field(object): def __init__(self): """Creates an instance of Field""" self.__system_mandatory = None self.__webhook = None self.__private = None self.__layouts = None self.__profiles = None self.__sequence_number = None self.__content = None self.__column_name = None self.__type = None self.__transition_sequence = None self.__personality_name = None self.__message = None self.__mandatory = None self.__criteria = None self.__related_details = None self.__json_type = None self.__crypt = None self.__field_label = None self.__tooltip = None self.__created_source = None self.__field_read_only = None self.__display_label = None self.__ui_type = None self.__read_only = None self.__association_details = None self.__quick_sequence_number = None self.__businesscard_supported = None self.__multi_module_lookup = None self.__currency = None self.__id = None self.__custom_field = None self.__lookup = None self.__filterable = None self.__visible = None self.__pick_list_values_sorted_lexically = None self.__length = None self.__view_type = None self.__subform = None self.__api_name = None self.__sortable = None self.__unique = None self.__data_type = None self.__formula = None self.__decimal_place = None self.__mass_update = None self.__blueprint_supported = None self.__multiselectlookup = None self.__multiuserlookup = None self.__pick_list_values = None self.__auto_number = None self.__default_value = None self.__validation_rule = None self.__convert_mapping = None self.__external = None self.__history_tracking = None self.__display_type = None self.__key_modified = dict() def get_system_mandatory(self): """ The method to get the system_mandatory Returns: bool: A bool representing the system_mandatory """ return self.__system_mandatory def set_system_mandatory(self, system_mandatory): """ The method to set the value to system_mandatory Parameters: system_mandatory (bool) : A bool representing the system_mandatory """ if system_mandatory is not None and not isinstance(system_mandatory, bool): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: system_mandatory EXPECTED TYPE: bool', None, None) self.__system_mandatory = system_mandatory self.__key_modified['system_mandatory'] = 1 def get_webhook(self): """ The method to get the webhook Returns: bool: A bool representing the webhook """ return self.__webhook def set_webhook(self, webhook): """ The method to set the value to webhook Parameters: webhook (bool) : A bool representing the webhook """ if webhook is not None and not isinstance(webhook, bool): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: webhook EXPECTED TYPE: bool', None, None) self.__webhook = webhook self.__key_modified['webhook'] = 1 def get_private(self): """ The method to get the private Returns: Private: An instance of Private """ return self.__private def set_private(self, private): """ The method to set the value to private Parameters: private (Private) : An instance of Private """ try: from zcrmsdk.src.com.zoho.crm.api.fields import Private except Exception: from ..fields import Private if private is not None and not isinstance(private, Private): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: private EXPECTED TYPE: Private', None, None) self.__private = private self.__key_modified['private'] = 1 def get_layouts(self): """ The method to get the layouts Returns: Layout: An instance of Layout """ return self.__layouts def set_layouts(self, layouts): """ The method to set the value to layouts Parameters: layouts (Layout) : An instance of Layout """ try: from zcrmsdk.src.com.zoho.crm.api.layouts import Layout except Exception: from ..layouts import Layout if layouts is not None and not isinstance(layouts, Layout): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: layouts EXPECTED TYPE: Layout', None, None) self.__layouts = layouts self.__key_modified['layouts'] = 1 def get_profiles(self): """ The method to get the profiles Returns: list: An instance of list """ return self.__profiles def set_profiles(self, profiles): """ The method to set the value to profiles Parameters: profiles (list) : An instance of list """ if profiles is not None and not isinstance(profiles, list): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: profiles EXPECTED TYPE: list', None, None) self.__profiles = profiles self.__key_modified['profiles'] = 1 def get_sequence_number(self): """ The method to get the sequence_number Returns: int: An int representing the sequence_number """ return self.__sequence_number def set_sequence_number(self, sequence_number): """ The method to set the value to sequence_number Parameters: sequence_number (int) : An int representing the sequence_number """ if sequence_number is not None and not isinstance(sequence_number, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: sequence_number EXPECTED TYPE: int', None, None) self.__sequence_number = sequence_number self.__key_modified['sequence_number'] = 1 def get_content(self): """ The method to get the content Returns: string: A string representing the content """ return self.__content def set_content(self, content): """ The method to set the value to content Parameters: content (string) : A string representing the content """ if content is not None and not isinstance(content, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: content EXPECTED TYPE: str', None, None) self.__content = content self.__key_modified['content'] = 1 def get_column_name(self): """ The method to get the column_name Returns: string: A string representing the column_name """ return self.__column_name def set_column_name(self, column_name): """ The method to set the value to column_name Parameters: column_name (string) : A string representing the column_name """ if column_name is not None and not isinstance(column_name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: column_name EXPECTED TYPE: str', None, None) self.__column_name = column_name self.__key_modified['column_name'] = 1 def get_type(self): """ The method to get the type Returns: string: A string representing the type """ return self.__type def set_type(self, type): """ The method to set the value to type Parameters: type (string) : A string representing the type """ if type is not None and not isinstance(type, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: type EXPECTED TYPE: str', None, None) self.__type = type self.__key_modified['_type'] = 1 def get_transition_sequence(self): """ The method to get the transition_sequence Returns: int: An int representing the transition_sequence """ return self.__transition_sequence def set_transition_sequence(self, transition_sequence): """ The method to set the value to transition_sequence Parameters: transition_sequence (int) : An int representing the transition_sequence """ if transition_sequence is not None and not isinstance(transition_sequence, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: transition_sequence EXPECTED TYPE: int', None, None) self.__transition_sequence = transition_sequence self.__key_modified['transition_sequence'] = 1 def get_personality_name(self): """ The method to get the personality_name Returns: string: A string representing the personality_name """ return self.__personality_name def set_personality_name(self, personality_name): """ The method to set the value to personality_name Parameters: personality_name (string) : A string representing the personality_name """ if personality_name is not None and not isinstance(personality_name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: personality_name EXPECTED TYPE: str', None, None) self.__personality_name = personality_name self.__key_modified['personality_name'] = 1 def get_message(self): """ The method to get the message Returns: string: A string representing the message """ return self.__message def set_message(self, message): """ The method to set the value to message Parameters: message (string) : A string representing the message """ if message is not None and not isinstance(message, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: message EXPECTED TYPE: str', None, None) self.__message = message self.__key_modified['message'] = 1 def get_mandatory(self): """ The method to get the mandatory Returns: bool: A bool representing the mandatory """ return self.__mandatory def set_mandatory(self, mandatory): """ The method to set the value to mandatory Parameters: mandatory (bool) : A bool representing the mandatory """ if mandatory is not None and not isinstance(mandatory, bool): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: mandatory EXPECTED TYPE: bool', None, None) self.__mandatory = mandatory self.__key_modified['mandatory'] = 1 def get_criteria(self): """ The method to get the criteria Returns: Criteria: An instance of Criteria """ return self.__criteria def set_criteria(self, criteria): """ The method to set the value to criteria Parameters: criteria (Criteria) : An instance of Criteria """ try: from zcrmsdk.src.com.zoho.crm.api.customviews import Criteria except Exception: from ..custom_views import Criteria if criteria is not None and not isinstance(criteria, Criteria): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: criteria EXPECTED TYPE: Criteria', None, None) self.__criteria = criteria self.__key_modified['criteria'] = 1 def get_related_details(self): """ The method to get the related_details Returns: RelatedDetails: An instance of RelatedDetails """ return self.__related_details def set_related_details(self, related_details): """ The method to set the value to related_details Parameters: related_details (RelatedDetails) : An instance of RelatedDetails """ try: from zcrmsdk.src.com.zoho.crm.api.fields import RelatedDetails except Exception: from ..fields import RelatedDetails if related_details is not None and not isinstance(related_details, RelatedDetails): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: related_details EXPECTED TYPE: RelatedDetails', None, None) self.__related_details = related_details self.__key_modified['related_details'] = 1 def get_json_type(self): """ The method to get the json_type Returns: string: A string representing the json_type """ return self.__json_type def set_json_type(self, json_type): """ The method to set the value to json_type Parameters: json_type (string) : A string representing the json_type """ if json_type is not None and not isinstance(json_type, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: json_type EXPECTED TYPE: str', None, None) self.__json_type = json_type self.__key_modified['json_type'] = 1 def get_crypt(self): """ The method to get the crypt Returns: Crypt: An instance of Crypt """ return self.__crypt def set_crypt(self, crypt): """ The method to set the value to crypt Parameters: crypt (Crypt) : An instance of Crypt """ try: from zcrmsdk.src.com.zoho.crm.api.fields import Crypt except Exception: from ..fields import Crypt if crypt is not None and not isinstance(crypt, Crypt): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: crypt EXPECTED TYPE: Crypt', None, None) self.__crypt = crypt self.__key_modified['crypt'] = 1 def get_field_label(self): """ The method to get the field_label Returns: string: A string representing the field_label """ return self.__field_label def set_field_label(self, field_label): """ The method to set the value to field_label Parameters: field_label (string) : A string representing the field_label """ if field_label is not None and not isinstance(field_label, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: field_label EXPECTED TYPE: str', None, None) self.__field_label = field_label self.__key_modified['field_label'] = 1 def get_tooltip(self): """ The method to get the tooltip Returns: ToolTip: An instance of ToolTip """ return self.__tooltip def set_tooltip(self, tooltip): """ The method to set the value to tooltip Parameters: tooltip (ToolTip) : An instance of ToolTip """ try: from zcrmsdk.src.com.zoho.crm.api.fields import ToolTip except Exception: from ..fields import ToolTip if tooltip is not None and not isinstance(tooltip, ToolTip): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: tooltip EXPECTED TYPE: ToolTip', None, None) self.__tooltip = tooltip self.__key_modified['tooltip'] = 1 def get_created_source(self): """ The method to get the created_source Returns: string: A string representing the created_source """ return self.__created_source def set_created_source(self, created_source): """ The method to set the value to created_source Parameters: created_source (string) : A string representing the created_source """ if created_source is not None and not isinstance(created_source, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: created_source EXPECTED TYPE: str', None, None) self.__created_source = created_source self.__key_modified['created_source'] = 1 def get_field_read_only(self): """ The method to get the field_read_only Returns: bool: A bool representing the field_read_only """ return self.__field_read_only def set_field_read_only(self, field_read_only): """ The method to set the value to field_read_only Parameters: field_read_only (bool) : A bool representing the field_read_only """ if field_read_only is not None and not isinstance(field_read_only, bool): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: field_read_only EXPECTED TYPE: bool', None, None) self.__field_read_only = field_read_only self.__key_modified['field_read_only'] = 1 def get_display_label(self): """ The method to get the display_label Returns: string: A string representing the display_label """ return self.__display_label def set_display_label(self, display_label): """ The method to set the value to display_label Parameters: display_label (string) : A string representing the display_label """ if display_label is not None and not isinstance(display_label, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: display_label EXPECTED TYPE: str', None, None) self.__display_label = display_label self.__key_modified['display_label'] = 1 def get_ui_type(self): """ The method to get the ui_type Returns: int: An int representing the ui_type """ return self.__ui_type def set_ui_type(self, ui_type): """ The method to set the value to ui_type Parameters: ui_type (int) : An int representing the ui_type """ if ui_type is not None and not isinstance(ui_type, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: ui_type EXPECTED TYPE: int', None, None) self.__ui_type = ui_type self.__key_modified['ui_type'] = 1 def get_read_only(self): """ The method to get the read_only Returns: bool: A bool representing the read_only """ return self.__read_only def set_read_only(self, read_only): """ The method to set the value to read_only Parameters: read_only (bool) : A bool representing the read_only """ if read_only is not None and not isinstance(read_only, bool): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: read_only EXPECTED TYPE: bool', None, None) self.__read_only = read_only self.__key_modified['read_only'] = 1 def get_association_details(self): """ The method to get the association_details Returns: AssociationDetails: An instance of AssociationDetails """ return self.__association_details def set_association_details(self, association_details): """ The method to set the value to association_details Parameters: association_details (AssociationDetails) : An instance of AssociationDetails """ try: from zcrmsdk.src.com.zoho.crm.api.fields import AssociationDetails except Exception: from ..fields import AssociationDetails if association_details is not None and not isinstance(association_details, AssociationDetails): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: association_details EXPECTED TYPE: AssociationDetails', None, None) self.__association_details = association_details self.__key_modified['association_details'] = 1 def get_quick_sequence_number(self): """ The method to get the quick_sequence_number Returns: int: An int representing the quick_sequence_number """ return self.__quick_sequence_number def set_quick_sequence_number(self, quick_sequence_number): """ The method to set the value to quick_sequence_number Parameters: quick_sequence_number (int) : An int representing the quick_sequence_number """ if quick_sequence_number is not None and not isinstance(quick_sequence_number, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: quick_sequence_number EXPECTED TYPE: int', None, None) self.__quick_sequence_number = quick_sequence_number self.__key_modified['quick_sequence_number'] = 1 def get_businesscard_supported(self): """ The method to get the businesscard_supported Returns: bool: A bool representing the businesscard_supported """ return self.__businesscard_supported def set_businesscard_supported(self, businesscard_supported): """ The method to set the value to businesscard_supported Parameters: businesscard_supported (bool) : A bool representing the businesscard_supported """ if businesscard_supported is not None and not isinstance(businesscard_supported, bool): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: businesscard_supported EXPECTED TYPE: bool', None, None) self.__businesscard_supported = businesscard_supported self.__key_modified['businesscard_supported'] = 1 def get_multi_module_lookup(self): """ The method to get the multi_module_lookup Returns: MultiModuleLookup: An instance of MultiModuleLookup """ return self.__multi_module_lookup def set_multi_module_lookup(self, multi_module_lookup): """ The method to set the value to multi_module_lookup Parameters: multi_module_lookup (MultiModuleLookup) : An instance of MultiModuleLookup """ try: from zcrmsdk.src.com.zoho.crm.api.fields import MultiModuleLookup except Exception: from ..fields import MultiModuleLookup if multi_module_lookup is not None and not isinstance(multi_module_lookup, MultiModuleLookup): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: multi_module_lookup EXPECTED TYPE: MultiModuleLookup', None, None) self.__multi_module_lookup = multi_module_lookup self.__key_modified['multi_module_lookup'] = 1 def get_currency(self): """ The method to get the currency Returns: Currency: An instance of Currency """ return self.__currency def set_currency(self, currency): """ The method to set the value to currency Parameters: currency (Currency) : An instance of Currency """ try: from zcrmsdk.src.com.zoho.crm.api.fields import Currency except Exception: from ..fields import Currency if currency is not None and not isinstance(currency, Currency): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: currency EXPECTED TYPE: Currency', None, None) self.__currency = currency self.__key_modified['currency'] = 1 def get_id(self): """ The method to get the id Returns: int: An int representing the id """ return self.__id def set_id(self, id): """ The method to set the value to id Parameters: id (int) : An int representing the id """ if id is not None and not isinstance(id, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: int', None, None) self.__id = id self.__key_modified['id'] = 1 def get_custom_field(self): """ The method to get the custom_field Returns: bool: A bool representing the custom_field """ return self.__custom_field def set_custom_field(self, custom_field): """ The method to set the value to custom_field Parameters: custom_field (bool) : A bool representing the custom_field """ if custom_field is not None and not isinstance(custom_field, bool): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: custom_field EXPECTED TYPE: bool', None, None) self.__custom_field = custom_field self.__key_modified['custom_field'] = 1 def get_lookup(self): """ The method to get the lookup Returns: Module: An instance of Module """ return self.__lookup def set_lookup(self, lookup): """ The method to set the value to lookup Parameters: lookup (Module) : An instance of Module """ try: from zcrmsdk.src.com.zoho.crm.api.fields import Module except Exception: from ..fields import Module if lookup is not None and not isinstance(lookup, Module): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: lookup EXPECTED TYPE: Module', None, None) self.__lookup = lookup self.__key_modified['lookup'] = 1 def get_filterable(self): """ The method to get the filterable Returns: bool: A bool representing the filterable """ return self.__filterable def set_filterable(self, filterable): """ The method to set the value to filterable Parameters: filterable (bool) : A bool representing the filterable """ if filterable is not None and not isinstance(filterable, bool): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: filterable EXPECTED TYPE: bool', None, None) self.__filterable = filterable self.__key_modified['filterable'] = 1 def get_visible(self): """ The method to get the visible Returns: bool: A bool representing the visible """ return self.__visible def set_visible(self, visible): """ The method to set the value to visible Parameters: visible (bool) : A bool representing the visible """ if visible is not None and not isinstance(visible, bool): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: visible EXPECTED TYPE: bool', None, None) self.__visible = visible self.__key_modified['visible'] = 1 def get_pick_list_values_sorted_lexically(self): """ The method to get the pick_list_values_sorted_lexically Returns: bool: A bool representing the pick_list_values_sorted_lexically """ return self.__pick_list_values_sorted_lexically def set_pick_list_values_sorted_lexically(self, pick_list_values_sorted_lexically): """ The method to set the value to pick_list_values_sorted_lexically Parameters: pick_list_values_sorted_lexically (bool) : A bool representing the pick_list_values_sorted_lexically """ if pick_list_values_sorted_lexically is not None and not isinstance(pick_list_values_sorted_lexically, bool): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: pick_list_values_sorted_lexically EXPECTED TYPE: bool', None, None) self.__pick_list_values_sorted_lexically = pick_list_values_sorted_lexically self.__key_modified['pick_list_values_sorted_lexically'] = 1 def get_length(self): """ The method to get the length Returns: int: An int representing the length """ return self.__length def set_length(self, length): """ The method to set the value to length Parameters: length (int) : An int representing the length """ if length is not None and not isinstance(length, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: length EXPECTED TYPE: int', None, None) self.__length = length self.__key_modified['length'] = 1 def get_view_type(self): """ The method to get the view_type Returns: ViewType: An instance of ViewType """ return self.__view_type def set_view_type(self, view_type): """ The method to set the value to view_type Parameters: view_type (ViewType) : An instance of ViewType """ try: from zcrmsdk.src.com.zoho.crm.api.fields import ViewType except Exception: from ..fields import ViewType if view_type is not None and not isinstance(view_type, ViewType): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: view_type EXPECTED TYPE: ViewType', None, None) self.__view_type = view_type self.__key_modified['view_type'] = 1 def get_subform(self): """ The method to get the subform Returns: Module: An instance of Module """ return self.__subform def set_subform(self, subform): """ The method to set the value to subform Parameters: subform (Module) : An instance of Module """ try: from zcrmsdk.src.com.zoho.crm.api.fields import Module except Exception: from ..fields import Module if subform is not None and not isinstance(subform, Module): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: subform EXPECTED TYPE: Module', None, None) self.__subform = subform self.__key_modified['subform'] = 1 def get_api_name(self): """ The method to get the api_name Returns: string: A string representing the api_name """ return self.__api_name def set_api_name(self, api_name): """ The method to set the value to api_name Parameters: api_name (string) : A string representing the api_name """ if api_name is not None and not isinstance(api_name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: api_name EXPECTED TYPE: str', None, None) self.__api_name = api_name self.__key_modified['api_name'] = 1 def get_sortable(self): """ The method to get the sortable Returns: bool: A bool representing the sortable """ return self.__sortable def set_sortable(self, sortable): """ The method to set the value to sortable Parameters: sortable (bool) : A bool representing the sortable """ if sortable is not None and not isinstance(sortable, bool): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: sortable EXPECTED TYPE: bool', None, None) self.__sortable = sortable self.__key_modified['sortable'] = 1 def get_unique(self): """ The method to get the unique Returns: Unique: An instance of Unique """ return self.__unique def set_unique(self, unique): """ The method to set the value to unique Parameters: unique (Unique) : An instance of Unique """ try: from zcrmsdk.src.com.zoho.crm.api.fields import Unique except Exception: from ..fields import Unique if unique is not None and not isinstance(unique, Unique): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: unique EXPECTED TYPE: Unique', None, None) self.__unique = unique self.__key_modified['unique'] = 1 def get_data_type(self): """ The method to get the data_type Returns: string: A string representing the data_type """ return self.__data_type def set_data_type(self, data_type): """ The method to set the value to data_type Parameters: data_type (string) : A string representing the data_type """ if data_type is not None and not isinstance(data_type, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: data_type EXPECTED TYPE: str', None, None) self.__data_type = data_type self.__key_modified['data_type'] = 1 def get_formula(self): """ The method to get the formula Returns: Formula: An instance of Formula """ return self.__formula def set_formula(self, formula): """ The method to set the value to formula Parameters: formula (Formula) : An instance of Formula """ try: from zcrmsdk.src.com.zoho.crm.api.fields import Formula except Exception: from ..fields import Formula if formula is not None and not isinstance(formula, Formula): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: formula EXPECTED TYPE: Formula', None, None) self.__formula = formula self.__key_modified['formula'] = 1 def get_decimal_place(self): """ The method to get the decimal_place Returns: int: An int representing the decimal_place """ return self.__decimal_place def set_decimal_place(self, decimal_place): """ The method to set the value to decimal_place Parameters: decimal_place (int) : An int representing the decimal_place """ if decimal_place is not None and not isinstance(decimal_place, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: decimal_place EXPECTED TYPE: int', None, None) self.__decimal_place = decimal_place self.__key_modified['decimal_place'] = 1 def get_mass_update(self): """ The method to get the mass_update Returns: bool: A bool representing the mass_update """ return self.__mass_update def set_mass_update(self, mass_update): """ The method to set the value to mass_update Parameters: mass_update (bool) : A bool representing the mass_update """ if mass_update is not None and not isinstance(mass_update, bool): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: mass_update EXPECTED TYPE: bool', None, None) self.__mass_update = mass_update self.__key_modified['mass_update'] = 1 def get_blueprint_supported(self): """ The method to get the blueprint_supported Returns: bool: A bool representing the blueprint_supported """ return self.__blueprint_supported def set_blueprint_supported(self, blueprint_supported): """ The method to set the value to blueprint_supported Parameters: blueprint_supported (bool) : A bool representing the blueprint_supported """ if blueprint_supported is not None and not isinstance(blueprint_supported, bool): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: blueprint_supported EXPECTED TYPE: bool', None, None) self.__blueprint_supported = blueprint_supported self.__key_modified['blueprint_supported'] = 1 def get_multiselectlookup(self): """ The method to get the multiselectlookup Returns: MultiSelectLookup: An instance of MultiSelectLookup """ return self.__multiselectlookup def set_multiselectlookup(self, multiselectlookup): """ The method to set the value to multiselectlookup Parameters: multiselectlookup (MultiSelectLookup) : An instance of MultiSelectLookup """ try: from zcrmsdk.src.com.zoho.crm.api.fields import MultiSelectLookup except Exception: from ..fields import MultiSelectLookup if multiselectlookup is not None and not isinstance(multiselectlookup, MultiSelectLookup): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: multiselectlookup EXPECTED TYPE: MultiSelectLookup', None, None) self.__multiselectlookup = multiselectlookup self.__key_modified['multiselectlookup'] = 1 def get_multiuserlookup(self): """ The method to get the multiuserlookup Returns: MultiUserLookup: An instance of MultiUserLookup """ return self.__multiuserlookup def set_multiuserlookup(self, multiuserlookup): """ The method to set the value to multiuserlookup Parameters: multiuserlookup (MultiUserLookup) : An instance of MultiUserLookup """ try: from zcrmsdk.src.com.zoho.crm.api.fields import MultiUserLookup except Exception: from ..fields import MultiUserLookup if multiuserlookup is not None and not isinstance(multiuserlookup, MultiUserLookup): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: multiuserlookup EXPECTED TYPE: MultiUserLookup', None, None) self.__multiuserlookup = multiuserlookup self.__key_modified['multiuserlookup'] = 1 def get_pick_list_values(self): """ The method to get the pick_list_values Returns: list: An instance of list """ return self.__pick_list_values def set_pick_list_values(self, pick_list_values): """ The method to set the value to pick_list_values Parameters: pick_list_values (list) : An instance of list """ if pick_list_values is not None and not isinstance(pick_list_values, list): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: pick_list_values EXPECTED TYPE: list', None, None) self.__pick_list_values = pick_list_values self.__key_modified['pick_list_values'] = 1 def get_auto_number(self): """ The method to get the auto_number Returns: AutoNumber: An instance of AutoNumber """ return self.__auto_number def set_auto_number(self, auto_number): """ The method to set the value to auto_number Parameters: auto_number (AutoNumber) : An instance of AutoNumber """ try: from zcrmsdk.src.com.zoho.crm.api.fields import AutoNumber except Exception: from ..fields import AutoNumber if auto_number is not None and not isinstance(auto_number, AutoNumber): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: auto_number EXPECTED TYPE: AutoNumber', None, None) self.__auto_number = auto_number self.__key_modified['auto_number'] = 1 def get_default_value(self): """ The method to get the default_value Returns: string: A string representing the default_value """ return self.__default_value def set_default_value(self, default_value): """ The method to set the value to default_value Parameters: default_value (string) : A string representing the default_value """ if default_value is not None and not isinstance(default_value, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: default_value EXPECTED TYPE: str', None, None) self.__default_value = default_value self.__key_modified['default_value'] = 1 def get_validation_rule(self): """ The method to get the validation_rule Returns: dict: An instance of dict """ return self.__validation_rule def set_validation_rule(self, validation_rule): """ The method to set the value to validation_rule Parameters: validation_rule (dict) : An instance of dict """ if validation_rule is not None and not isinstance(validation_rule, dict): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: validation_rule EXPECTED TYPE: dict', None, None) self.__validation_rule = validation_rule self.__key_modified['validation_rule'] = 1 def get_convert_mapping(self): """ The method to get the convert_mapping Returns: dict: An instance of dict """ return self.__convert_mapping def set_convert_mapping(self, convert_mapping): """ The method to set the value to convert_mapping Parameters: convert_mapping (dict) : An instance of dict """ if convert_mapping is not None and not isinstance(convert_mapping, dict): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: convert_mapping EXPECTED TYPE: dict', None, None) self.__convert_mapping = convert_mapping self.__key_modified['convert_mapping'] = 1 def get_external(self): """ The method to get the external Returns: External: An instance of External """ return self.__external def set_external(self, external): """ The method to set the value to external Parameters: external (External) : An instance of External """ try: from zcrmsdk.src.com.zoho.crm.api.fields import External except Exception: from ..fields import External if external is not None and not isinstance(external, External): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: external EXPECTED TYPE: External', None, None) self.__external = external self.__key_modified['external'] = 1 def get_history_tracking(self): """ The method to get the history_tracking Returns: HistoryTracking: An instance of HistoryTracking """ return self.__history_tracking def set_history_tracking(self, history_tracking): """ The method to set the value to history_tracking Parameters: history_tracking (HistoryTracking) : An instance of HistoryTracking """ try: from zcrmsdk.src.com.zoho.crm.api.fields import HistoryTracking except Exception: from ..fields import HistoryTracking if history_tracking is not None and not isinstance(history_tracking, HistoryTracking): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: history_tracking EXPECTED TYPE: HistoryTracking', None, None) self.__history_tracking = history_tracking self.__key_modified['history_tracking'] = 1 def get_display_type(self): """ The method to get the display_type Returns: Choice: An instance of Choice """ return self.__display_type def set_display_type(self, display_type): """ The method to set the value to display_type Parameters: display_type (Choice) : An instance of Choice """ if display_type is not None and not isinstance(display_type, Choice): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: display_type EXPECTED TYPE: Choice', None, None) self.__display_type = display_type self.__key_modified['display_type'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/blue_print/field.py
field.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants from zcrmsdk.src.com.zoho.crm.api.blue_print.response_handler import ResponseHandler except Exception: from ..exception import SDKException from ..util import Constants from .response_handler import ResponseHandler class ResponseWrapper(ResponseHandler): def __init__(self): """Creates an instance of ResponseWrapper""" super().__init__() self.__blueprint = None self.__key_modified = dict() def get_blueprint(self): """ The method to get the blueprint Returns: BluePrint: An instance of BluePrint """ return self.__blueprint def set_blueprint(self, blueprint): """ The method to set the value to blueprint Parameters: blueprint (BluePrint) : An instance of BluePrint """ try: from zcrmsdk.src.com.zoho.crm.api.blue_print.blue_print import BluePrint except Exception: from .blue_print import BluePrint if blueprint is not None and not isinstance(blueprint, BluePrint): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: blueprint EXPECTED TYPE: BluePrint', None, None) self.__blueprint = blueprint self.__key_modified['blueprint'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/blue_print/response_wrapper.py
response_wrapper.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants except Exception: from ..exception import SDKException from ..util import Constants class NextTransition(object): def __init__(self): """Creates an instance of NextTransition""" self.__id = None self.__criteria_matched = None self.__name = None self.__type = None self.__key_modified = dict() def get_id(self): """ The method to get the id Returns: int: An int representing the id """ return self.__id def set_id(self, id): """ The method to set the value to id Parameters: id (int) : An int representing the id """ if id is not None and not isinstance(id, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: int', None, None) self.__id = id self.__key_modified['id'] = 1 def get_criteria_matched(self): """ The method to get the criteria_matched Returns: bool: A bool representing the criteria_matched """ return self.__criteria_matched def set_criteria_matched(self, criteria_matched): """ The method to set the value to criteria_matched Parameters: criteria_matched (bool) : A bool representing the criteria_matched """ if criteria_matched is not None and not isinstance(criteria_matched, bool): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: criteria_matched EXPECTED TYPE: bool', None, None) self.__criteria_matched = criteria_matched self.__key_modified['criteria_matched'] = 1 def get_name(self): """ The method to get the name Returns: string: A string representing the name """ return self.__name def set_name(self, name): """ The method to set the value to name Parameters: name (string) : A string representing the name """ if name is not None and not isinstance(name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: name EXPECTED TYPE: str', None, None) self.__name = name self.__key_modified['name'] = 1 def get_type(self): """ The method to get the type Returns: string: A string representing the type """ return self.__type def set_type(self, type): """ The method to set the value to type Parameters: type (string) : A string representing the type """ if type is not None and not isinstance(type, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: type EXPECTED TYPE: str', None, None) self.__type = type self.__key_modified['type'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/blue_print/next_transition.py
next_transition.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants except Exception: from ..exception import SDKException from ..util import Constants class ProcessInfo(object): def __init__(self): """Creates an instance of ProcessInfo""" self.__field_id = None self.__is_continuous = None self.__api_name = None self.__continuous = None self.__field_label = None self.__name = None self.__column_name = None self.__field_value = None self.__id = None self.__field_name = None self.__escalation = None self.__key_modified = dict() def get_field_id(self): """ The method to get the field_id Returns: string: A string representing the field_id """ return self.__field_id def set_field_id(self, field_id): """ The method to set the value to field_id Parameters: field_id (string) : A string representing the field_id """ if field_id is not None and not isinstance(field_id, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: field_id EXPECTED TYPE: str', None, None) self.__field_id = field_id self.__key_modified['field_id'] = 1 def get_is_continuous(self): """ The method to get the is_continuous Returns: bool: A bool representing the is_continuous """ return self.__is_continuous def set_is_continuous(self, is_continuous): """ The method to set the value to is_continuous Parameters: is_continuous (bool) : A bool representing the is_continuous """ if is_continuous is not None and not isinstance(is_continuous, bool): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: is_continuous EXPECTED TYPE: bool', None, None) self.__is_continuous = is_continuous self.__key_modified['is_continuous'] = 1 def get_api_name(self): """ The method to get the api_name Returns: string: A string representing the api_name """ return self.__api_name def set_api_name(self, api_name): """ The method to set the value to api_name Parameters: api_name (string) : A string representing the api_name """ if api_name is not None and not isinstance(api_name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: api_name EXPECTED TYPE: str', None, None) self.__api_name = api_name self.__key_modified['api_name'] = 1 def get_continuous(self): """ The method to get the continuous Returns: bool: A bool representing the continuous """ return self.__continuous def set_continuous(self, continuous): """ The method to set the value to continuous Parameters: continuous (bool) : A bool representing the continuous """ if continuous is not None and not isinstance(continuous, bool): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: continuous EXPECTED TYPE: bool', None, None) self.__continuous = continuous self.__key_modified['continuous'] = 1 def get_field_label(self): """ The method to get the field_label Returns: string: A string representing the field_label """ return self.__field_label def set_field_label(self, field_label): """ The method to set the value to field_label Parameters: field_label (string) : A string representing the field_label """ if field_label is not None and not isinstance(field_label, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: field_label EXPECTED TYPE: str', None, None) self.__field_label = field_label self.__key_modified['field_label'] = 1 def get_name(self): """ The method to get the name Returns: string: A string representing the name """ return self.__name def set_name(self, name): """ The method to set the value to name Parameters: name (string) : A string representing the name """ if name is not None and not isinstance(name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: name EXPECTED TYPE: str', None, None) self.__name = name self.__key_modified['name'] = 1 def get_column_name(self): """ The method to get the column_name Returns: string: A string representing the column_name """ return self.__column_name def set_column_name(self, column_name): """ The method to set the value to column_name Parameters: column_name (string) : A string representing the column_name """ if column_name is not None and not isinstance(column_name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: column_name EXPECTED TYPE: str', None, None) self.__column_name = column_name self.__key_modified['column_name'] = 1 def get_field_value(self): """ The method to get the field_value Returns: string: A string representing the field_value """ return self.__field_value def set_field_value(self, field_value): """ The method to set the value to field_value Parameters: field_value (string) : A string representing the field_value """ if field_value is not None and not isinstance(field_value, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: field_value EXPECTED TYPE: str', None, None) self.__field_value = field_value self.__key_modified['field_value'] = 1 def get_id(self): """ The method to get the id Returns: int: An int representing the id """ return self.__id def set_id(self, id): """ The method to set the value to id Parameters: id (int) : An int representing the id """ if id is not None and not isinstance(id, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: int', None, None) self.__id = id self.__key_modified['id'] = 1 def get_field_name(self): """ The method to get the field_name Returns: string: A string representing the field_name """ return self.__field_name def set_field_name(self, field_name): """ The method to set the value to field_name Parameters: field_name (string) : A string representing the field_name """ if field_name is not None and not isinstance(field_name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: field_name EXPECTED TYPE: str', None, None) self.__field_name = field_name self.__key_modified['field_name'] = 1 def get_escalation(self): """ The method to get the escalation Returns: Escalation: An instance of Escalation """ return self.__escalation def set_escalation(self, escalation): """ The method to set the value to escalation Parameters: escalation (Escalation) : An instance of Escalation """ try: from zcrmsdk.src.com.zoho.crm.api.blue_print.escalation import Escalation except Exception: from .escalation import Escalation if escalation is not None and not isinstance(escalation, Escalation): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: escalation EXPECTED TYPE: Escalation', None, None) self.__escalation = escalation self.__key_modified['escalation'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/blue_print/process_info.py
process_info.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants except Exception: from ..exception import SDKException from ..util import Constants class BluePrint(object): def __init__(self): """Creates an instance of BluePrint""" self.__transition_id = None self.__data = None self.__process_info = None self.__transitions = None self.__key_modified = dict() def get_transition_id(self): """ The method to get the transition_id Returns: int: An int representing the transition_id """ return self.__transition_id def set_transition_id(self, transition_id): """ The method to set the value to transition_id Parameters: transition_id (int) : An int representing the transition_id """ if transition_id is not None and not isinstance(transition_id, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: transition_id EXPECTED TYPE: int', None, None) self.__transition_id = transition_id self.__key_modified['transition_id'] = 1 def get_data(self): """ The method to get the data Returns: Record: An instance of Record """ return self.__data def set_data(self, data): """ The method to set the value to data Parameters: data (Record) : An instance of Record """ try: from zcrmsdk.src.com.zoho.crm.api.record import Record except Exception: from ..record import Record if data is not None and not isinstance(data, Record): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: data EXPECTED TYPE: Record', None, None) self.__data = data self.__key_modified['data'] = 1 def get_process_info(self): """ The method to get the process_info Returns: ProcessInfo: An instance of ProcessInfo """ return self.__process_info def set_process_info(self, process_info): """ The method to set the value to process_info Parameters: process_info (ProcessInfo) : An instance of ProcessInfo """ try: from zcrmsdk.src.com.zoho.crm.api.blue_print.process_info import ProcessInfo except Exception: from .process_info import ProcessInfo if process_info is not None and not isinstance(process_info, ProcessInfo): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: process_info EXPECTED TYPE: ProcessInfo', None, None) self.__process_info = process_info self.__key_modified['process_info'] = 1 def get_transitions(self): """ The method to get the transitions Returns: list: An instance of list """ return self.__transitions def set_transitions(self, transitions): """ The method to set the value to transitions Parameters: transitions (list) : An instance of list """ if transitions is not None and not isinstance(transitions, list): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: transitions EXPECTED TYPE: list', None, None) self.__transitions = transitions self.__key_modified['transitions'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/blue_print/blue_print.py
blue_print.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Choice, Constants from zcrmsdk.src.com.zoho.crm.api.blue_print.action_response import ActionResponse from zcrmsdk.src.com.zoho.crm.api.blue_print.response_handler import ResponseHandler except Exception: from ..exception import SDKException from ..util import Choice, Constants from .action_response import ActionResponse from .response_handler import ResponseHandler class APIException(ResponseHandler, ActionResponse): def __init__(self): """Creates an instance of APIException""" super().__init__() self.__status = None self.__code = None self.__message = None self.__details = None self.__key_modified = dict() def get_status(self): """ The method to get the status Returns: Choice: An instance of Choice """ return self.__status def set_status(self, status): """ The method to set the value to status Parameters: status (Choice) : An instance of Choice """ if status is not None and not isinstance(status, Choice): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: status EXPECTED TYPE: Choice', None, None) self.__status = status self.__key_modified['status'] = 1 def get_code(self): """ The method to get the code Returns: Choice: An instance of Choice """ return self.__code def set_code(self, code): """ The method to set the value to code Parameters: code (Choice) : An instance of Choice """ if code is not None and not isinstance(code, Choice): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: code EXPECTED TYPE: Choice', None, None) self.__code = code self.__key_modified['code'] = 1 def get_message(self): """ The method to get the message Returns: Choice: An instance of Choice """ return self.__message def set_message(self, message): """ The method to set the value to message Parameters: message (Choice) : An instance of Choice """ if message is not None and not isinstance(message, Choice): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: message EXPECTED TYPE: Choice', None, None) self.__message = message self.__key_modified['message'] = 1 def get_details(self): """ The method to get the details Returns: dict: An instance of dict """ return self.__details def set_details(self, details): """ The method to set the value to details Parameters: details (dict) : An instance of dict """ if details is not None and not isinstance(details, dict): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: details EXPECTED TYPE: dict', None, None) self.__details = details self.__key_modified['details'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/blue_print/api_exception.py
api_exception.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants except Exception: from ..exception import SDKException from ..util import Constants class Transition(object): def __init__(self): """Creates an instance of Transition""" self.__next_transitions = None self.__parent_transition = None self.__percent_partial_save = None self.__data = None self.__next_field_value = None self.__name = None self.__criteria_matched = None self.__id = None self.__fields = None self.__criteria_message = None self.__type = None self.__execution_time = None self.__key_modified = dict() def get_next_transitions(self): """ The method to get the next_transitions Returns: list: An instance of list """ return self.__next_transitions def set_next_transitions(self, next_transitions): """ The method to set the value to next_transitions Parameters: next_transitions (list) : An instance of list """ if next_transitions is not None and not isinstance(next_transitions, list): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: next_transitions EXPECTED TYPE: list', None, None) self.__next_transitions = next_transitions self.__key_modified['next_transitions'] = 1 def get_parent_transition(self): """ The method to get the parent_transition Returns: Transition: An instance of Transition """ return self.__parent_transition def set_parent_transition(self, parent_transition): """ The method to set the value to parent_transition Parameters: parent_transition (Transition) : An instance of Transition """ try: from zcrmsdk.src.com.zoho.crm.api.blue_print.transition import Transition except Exception: from .transition import Transition if parent_transition is not None and not isinstance(parent_transition, Transition): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: parent_transition EXPECTED TYPE: Transition', None, None) self.__parent_transition = parent_transition self.__key_modified['parent_transition'] = 1 def get_percent_partial_save(self): """ The method to get the percent_partial_save Returns: float: A float representing the percent_partial_save """ return self.__percent_partial_save def set_percent_partial_save(self, percent_partial_save): """ The method to set the value to percent_partial_save Parameters: percent_partial_save (float) : A float representing the percent_partial_save """ if percent_partial_save is not None and not isinstance(percent_partial_save, float): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: percent_partial_save EXPECTED TYPE: float', None, None) self.__percent_partial_save = percent_partial_save self.__key_modified['percent_partial_save'] = 1 def get_data(self): """ The method to get the data Returns: Record: An instance of Record """ return self.__data def set_data(self, data): """ The method to set the value to data Parameters: data (Record) : An instance of Record """ try: from zcrmsdk.src.com.zoho.crm.api.record import Record except Exception: from ..record import Record if data is not None and not isinstance(data, Record): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: data EXPECTED TYPE: Record', None, None) self.__data = data self.__key_modified['data'] = 1 def get_next_field_value(self): """ The method to get the next_field_value Returns: string: A string representing the next_field_value """ return self.__next_field_value def set_next_field_value(self, next_field_value): """ The method to set the value to next_field_value Parameters: next_field_value (string) : A string representing the next_field_value """ if next_field_value is not None and not isinstance(next_field_value, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: next_field_value EXPECTED TYPE: str', None, None) self.__next_field_value = next_field_value self.__key_modified['next_field_value'] = 1 def get_name(self): """ The method to get the name Returns: string: A string representing the name """ return self.__name def set_name(self, name): """ The method to set the value to name Parameters: name (string) : A string representing the name """ if name is not None and not isinstance(name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: name EXPECTED TYPE: str', None, None) self.__name = name self.__key_modified['name'] = 1 def get_criteria_matched(self): """ The method to get the criteria_matched Returns: bool: A bool representing the criteria_matched """ return self.__criteria_matched def set_criteria_matched(self, criteria_matched): """ The method to set the value to criteria_matched Parameters: criteria_matched (bool) : A bool representing the criteria_matched """ if criteria_matched is not None and not isinstance(criteria_matched, bool): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: criteria_matched EXPECTED TYPE: bool', None, None) self.__criteria_matched = criteria_matched self.__key_modified['criteria_matched'] = 1 def get_id(self): """ The method to get the id Returns: int: An int representing the id """ return self.__id def set_id(self, id): """ The method to set the value to id Parameters: id (int) : An int representing the id """ if id is not None and not isinstance(id, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: int', None, None) self.__id = id self.__key_modified['id'] = 1 def get_fields(self): """ The method to get the fields Returns: list: An instance of list """ return self.__fields def set_fields(self, fields): """ The method to set the value to fields Parameters: fields (list) : An instance of list """ if fields is not None and not isinstance(fields, list): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: fields EXPECTED TYPE: list', None, None) self.__fields = fields self.__key_modified['fields'] = 1 def get_criteria_message(self): """ The method to get the criteria_message Returns: string: A string representing the criteria_message """ return self.__criteria_message def set_criteria_message(self, criteria_message): """ The method to set the value to criteria_message Parameters: criteria_message (string) : A string representing the criteria_message """ if criteria_message is not None and not isinstance(criteria_message, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: criteria_message EXPECTED TYPE: str', None, None) self.__criteria_message = criteria_message self.__key_modified['criteria_message'] = 1 def get_type(self): """ The method to get the type Returns: string: A string representing the type """ return self.__type def set_type(self, type): """ The method to set the value to type Parameters: type (string) : A string representing the type """ if type is not None and not isinstance(type, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: type EXPECTED TYPE: str', None, None) self.__type = type self.__key_modified['type'] = 1 def get_execution_time(self): """ The method to get the execution_time Returns: datetime: An instance of datetime """ return self.__execution_time def set_execution_time(self, execution_time): """ The method to set the value to execution_time Parameters: execution_time (datetime) : An instance of datetime """ from datetime import datetime if execution_time is not None and not isinstance(execution_time, datetime): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: execution_time EXPECTED TYPE: datetime', None, None) self.__execution_time = execution_time self.__key_modified['execution_time'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/blue_print/transition.py
transition.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants except Exception: from ..exception import SDKException from ..util import Constants class Escalation(object): def __init__(self): """Creates an instance of Escalation""" self.__days = None self.__status = None self.__key_modified = dict() def get_days(self): """ The method to get the days Returns: int: An int representing the days """ return self.__days def set_days(self, days): """ The method to set the value to days Parameters: days (int) : An int representing the days """ if days is not None and not isinstance(days, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: days EXPECTED TYPE: int', None, None) self.__days = days self.__key_modified['days'] = 1 def get_status(self): """ The method to get the status Returns: string: A string representing the status """ return self.__status def set_status(self, status): """ The method to set the value to status Parameters: status (string) : A string representing the status """ if status is not None and not isinstance(status, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: status EXPECTED TYPE: str', None, None) self.__status = status self.__key_modified['status'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/blue_print/escalation.py
escalation.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants except Exception: from ..exception import SDKException from ..util import Constants class ValidationError(object): def __init__(self): """Creates an instance of ValidationError""" self.__api_name = None self.__info_message = None self.__message = None self.__index = None self.__parent_api_name = None self.__key_modified = dict() def get_api_name(self): """ The method to get the api_name Returns: string: A string representing the api_name """ return self.__api_name def set_api_name(self, api_name): """ The method to set the value to api_name Parameters: api_name (string) : A string representing the api_name """ if api_name is not None and not isinstance(api_name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: api_name EXPECTED TYPE: str', None, None) self.__api_name = api_name self.__key_modified['api_name'] = 1 def get_info_message(self): """ The method to get the info_message Returns: string: A string representing the info_message """ return self.__info_message def set_info_message(self, info_message): """ The method to set the value to info_message Parameters: info_message (string) : A string representing the info_message """ if info_message is not None and not isinstance(info_message, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: info_message EXPECTED TYPE: str', None, None) self.__info_message = info_message self.__key_modified['info_message'] = 1 def get_message(self): """ The method to get the message Returns: string: A string representing the message """ return self.__message def set_message(self, message): """ The method to set the value to message Parameters: message (string) : A string representing the message """ if message is not None and not isinstance(message, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: message EXPECTED TYPE: str', None, None) self.__message = message self.__key_modified['message'] = 1 def get_index(self): """ The method to get the index Returns: int: An int representing the index """ return self.__index def set_index(self, index): """ The method to set the value to index Parameters: index (int) : An int representing the index """ if index is not None and not isinstance(index, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: index EXPECTED TYPE: int', None, None) self.__index = index self.__key_modified['index'] = 1 def get_parent_api_name(self): """ The method to get the parent_api_name Returns: string: A string representing the parent_api_name """ return self.__parent_api_name def set_parent_api_name(self, parent_api_name): """ The method to set the value to parent_api_name Parameters: parent_api_name (string) : A string representing the parent_api_name """ if parent_api_name is not None and not isinstance(parent_api_name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: parent_api_name EXPECTED TYPE: str', None, None) self.__parent_api_name = parent_api_name self.__key_modified['parent_api_name'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/blue_print/validation_error.py
validation_error.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Choice, Constants from zcrmsdk.src.com.zoho.crm.api.blue_print.action_response import ActionResponse except Exception: from ..exception import SDKException from ..util import Choice, Constants from .action_response import ActionResponse class SuccessResponse(ActionResponse): def __init__(self): """Creates an instance of SuccessResponse""" super().__init__() self.__status = None self.__code = None self.__message = None self.__details = None self.__key_modified = dict() def get_status(self): """ The method to get the status Returns: Choice: An instance of Choice """ return self.__status def set_status(self, status): """ The method to set the value to status Parameters: status (Choice) : An instance of Choice """ if status is not None and not isinstance(status, Choice): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: status EXPECTED TYPE: Choice', None, None) self.__status = status self.__key_modified['status'] = 1 def get_code(self): """ The method to get the code Returns: Choice: An instance of Choice """ return self.__code def set_code(self, code): """ The method to set the value to code Parameters: code (Choice) : An instance of Choice """ if code is not None and not isinstance(code, Choice): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: code EXPECTED TYPE: Choice', None, None) self.__code = code self.__key_modified['code'] = 1 def get_message(self): """ The method to get the message Returns: Choice: An instance of Choice """ return self.__message def set_message(self, message): """ The method to set the value to message Parameters: message (Choice) : An instance of Choice """ if message is not None and not isinstance(message, Choice): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: message EXPECTED TYPE: Choice', None, None) self.__message = message self.__key_modified['message'] = 1 def get_details(self): """ The method to get the details Returns: dict: An instance of dict """ return self.__details def set_details(self, details): """ The method to set the value to details Parameters: details (dict) : An instance of dict """ if details is not None and not isinstance(details, dict): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: details EXPECTED TYPE: dict', None, None) self.__details = details self.__key_modified['details'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/blue_print/success_response.py
success_response.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import APIResponse, CommonAPIHandler, Constants except Exception: from ..exception import SDKException from ..util import APIResponse, CommonAPIHandler, Constants class BluePrintOperations(object): def __init__(self, record_id, module_api_name): """ Creates an instance of BluePrintOperations with the given parameters Parameters: record_id (int) : An int representing the record_id module_api_name (string) : A string representing the module_api_name """ if not isinstance(record_id, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: record_id EXPECTED TYPE: int', None, None) if not isinstance(module_api_name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: module_api_name EXPECTED TYPE: str', None, None) self.__record_id = record_id self.__module_api_name = module_api_name def get_blueprint(self): """ The method to get blueprint Returns: APIResponse: An instance of APIResponse Raises: SDKException """ handler_instance = CommonAPIHandler() api_path = '' api_path = api_path + '/crm/v2.1/' api_path = api_path + str(self.__module_api_name) api_path = api_path + '/' api_path = api_path + str(self.__record_id) api_path = api_path + '/actions/blueprint' handler_instance.set_api_path(api_path) handler_instance.set_http_method(Constants.REQUEST_METHOD_GET) handler_instance.set_category_method(Constants.REQUEST_CATEGORY_READ) try: from zcrmsdk.src.com.zoho.crm.api.blue_print.response_handler import ResponseHandler except Exception: from .response_handler import ResponseHandler return handler_instance.api_call(ResponseHandler.__module__, 'application/json') def update_blueprint(self, request): """ The method to update blueprint Parameters: request (BodyWrapper) : An instance of BodyWrapper Returns: APIResponse: An instance of APIResponse Raises: SDKException """ try: from zcrmsdk.src.com.zoho.crm.api.blue_print.body_wrapper import BodyWrapper except Exception: from .body_wrapper import BodyWrapper if request is not None and not isinstance(request, BodyWrapper): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: request EXPECTED TYPE: BodyWrapper', None, None) handler_instance = CommonAPIHandler() api_path = '' api_path = api_path + '/crm/v2.1/' api_path = api_path + str(self.__module_api_name) api_path = api_path + '/' api_path = api_path + str(self.__record_id) api_path = api_path + '/actions/blueprint' handler_instance.set_api_path(api_path) handler_instance.set_http_method(Constants.REQUEST_METHOD_PUT) handler_instance.set_category_method(Constants.REQUEST_CATEGORY_UPDATE) handler_instance.set_content_type('application/json') handler_instance.set_request(request) handler_instance.set_mandatory_checker(True) try: from zcrmsdk.src.com.zoho.crm.api.blue_print.action_response import ActionResponse except Exception: from .action_response import ActionResponse return handler_instance.api_call(ActionResponse.__module__, 'application/json')
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/blue_print/blue_print_operations.py
blue_print_operations.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants from zcrmsdk.src.com.zoho.crm.api.email_templates.response_handler import ResponseHandler except Exception: from ..exception import SDKException from ..util import Constants from .response_handler import ResponseHandler class ResponseWrapper(ResponseHandler): def __init__(self): """Creates an instance of ResponseWrapper""" super().__init__() self.__email_templates = None self.__info = None self.__key_modified = dict() def get_email_templates(self): """ The method to get the email_templates Returns: list: An instance of list """ return self.__email_templates def set_email_templates(self, email_templates): """ The method to set the value to email_templates Parameters: email_templates (list) : An instance of list """ if email_templates is not None and not isinstance(email_templates, list): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: email_templates EXPECTED TYPE: list', None, None) self.__email_templates = email_templates self.__key_modified['email_templates'] = 1 def get_info(self): """ The method to get the info Returns: Info: An instance of Info """ return self.__info def set_info(self, info): """ The method to set the value to info Parameters: info (Info) : An instance of Info """ try: from zcrmsdk.src.com.zoho.crm.api.record import Info except Exception: from ..record import Info if info is not None and not isinstance(info, Info): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: info EXPECTED TYPE: Info', None, None) self.__info = info self.__key_modified['info'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/email_templates/response_wrapper.py
response_wrapper.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.parameter_map import ParameterMap from zcrmsdk.src.com.zoho.crm.api.util import APIResponse, CommonAPIHandler, Constants from zcrmsdk.src.com.zoho.crm.api.param import Param except Exception: from ..exception import SDKException from ..parameter_map import ParameterMap from ..util import APIResponse, CommonAPIHandler, Constants from ..param import Param class EmailTemplatesOperations(object): def __init__(self): """Creates an instance of EmailTemplatesOperations""" pass def get_email_templates(self, param_instance=None): """ The method to get email templates Parameters: param_instance (ParameterMap) : An instance of ParameterMap Returns: APIResponse: An instance of APIResponse Raises: SDKException """ if param_instance is not None and not isinstance(param_instance, ParameterMap): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: param_instance EXPECTED TYPE: ParameterMap', None, None) handler_instance = CommonAPIHandler() api_path = '' api_path = api_path + '/crm/v2.1/settings/email_templates' handler_instance.set_api_path(api_path) handler_instance.set_http_method(Constants.REQUEST_METHOD_GET) handler_instance.set_category_method(Constants.REQUEST_CATEGORY_READ) handler_instance.set_param(param_instance) try: from zcrmsdk.src.com.zoho.crm.api.email_templates.response_handler import ResponseHandler except Exception: from .response_handler import ResponseHandler return handler_instance.api_call(ResponseHandler.__module__, 'application/json') def get_email_template_by_id(self, id): """ The method to get email template by id Parameters: id (int) : An int representing the id Returns: APIResponse: An instance of APIResponse Raises: SDKException """ if not isinstance(id, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: int', None, None) handler_instance = CommonAPIHandler() api_path = '' api_path = api_path + '/crm/v2.1/settings/email_templates/' api_path = api_path + str(id) handler_instance.set_api_path(api_path) handler_instance.set_http_method(Constants.REQUEST_METHOD_GET) handler_instance.set_category_method(Constants.REQUEST_CATEGORY_READ) try: from zcrmsdk.src.com.zoho.crm.api.email_templates.response_handler import ResponseHandler except Exception: from .response_handler import ResponseHandler return handler_instance.api_call(ResponseHandler.__module__, 'application/json') class GetEmailTemplatesParam(object): module = Param('module', 'com.zoho.crm.api.EmailTemplates.GetEmailTemplatesParam')
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/email_templates/email_templates_operations.py
email_templates_operations.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Choice, Constants from zcrmsdk.src.com.zoho.crm.api.email_templates.response_handler import ResponseHandler except Exception: from ..exception import SDKException from ..util import Choice, Constants from .response_handler import ResponseHandler class APIException(ResponseHandler): def __init__(self): """Creates an instance of APIException""" super().__init__() self.__code = None self.__status = None self.__message = None self.__details = None self.__key_modified = dict() def get_code(self): """ The method to get the code Returns: Choice: An instance of Choice """ return self.__code def set_code(self, code): """ The method to set the value to code Parameters: code (Choice) : An instance of Choice """ if code is not None and not isinstance(code, Choice): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: code EXPECTED TYPE: Choice', None, None) self.__code = code self.__key_modified['code'] = 1 def get_status(self): """ The method to get the status Returns: Choice: An instance of Choice """ return self.__status def set_status(self, status): """ The method to set the value to status Parameters: status (Choice) : An instance of Choice """ if status is not None and not isinstance(status, Choice): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: status EXPECTED TYPE: Choice', None, None) self.__status = status self.__key_modified['status'] = 1 def get_message(self): """ The method to get the message Returns: Choice: An instance of Choice """ return self.__message def set_message(self, message): """ The method to set the value to message Parameters: message (Choice) : An instance of Choice """ if message is not None and not isinstance(message, Choice): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: message EXPECTED TYPE: Choice', None, None) self.__message = message self.__key_modified['message'] = 1 def get_details(self): """ The method to get the details Returns: dict: An instance of dict """ return self.__details def set_details(self, details): """ The method to set the value to details Parameters: details (dict) : An instance of dict """ if details is not None and not isinstance(details, dict): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: details EXPECTED TYPE: dict', None, None) self.__details = details self.__key_modified['details'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/email_templates/api_exception.py
api_exception.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants from zcrmsdk.src.com.zoho.crm.api.send_mail import Template except Exception: from ..exception import SDKException from ..util import Constants from ..send_mail import Template class EmailTemplate(Template): def __init__(self): """Creates an instance of EmailTemplate""" super().__init__() self.__content = None self.__created_time = None self.__subject = None self.__module = None self.__type = None self.__created_by = None self.__modified_time = None self.__last_usage_time = None self.__associated = None self.__name = None self.__modified_by = None self.__description = None self.__id = None self.__editor_mode = None self.__favorite = None self.__attachments = None self.__folder = None self.__consent_linked = None self.__key_modified = dict() def get_content(self): """ The method to get the content Returns: string: A string representing the content """ return self.__content def set_content(self, content): """ The method to set the value to content Parameters: content (string) : A string representing the content """ if content is not None and not isinstance(content, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: content EXPECTED TYPE: str', None, None) self.__content = content self.__key_modified['content'] = 1 def get_created_time(self): """ The method to get the created_time Returns: datetime: An instance of datetime """ return self.__created_time def set_created_time(self, created_time): """ The method to set the value to created_time Parameters: created_time (datetime) : An instance of datetime """ from datetime import datetime if created_time is not None and not isinstance(created_time, datetime): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: created_time EXPECTED TYPE: datetime', None, None) self.__created_time = created_time self.__key_modified['created_time'] = 1 def get_subject(self): """ The method to get the subject Returns: string: A string representing the subject """ return self.__subject def set_subject(self, subject): """ The method to set the value to subject Parameters: subject (string) : A string representing the subject """ if subject is not None and not isinstance(subject, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: subject EXPECTED TYPE: str', None, None) self.__subject = subject self.__key_modified['subject'] = 1 def get_module(self): """ The method to get the module Returns: Module: An instance of Module """ return self.__module def set_module(self, module): """ The method to set the value to module Parameters: module (Module) : An instance of Module """ try: from zcrmsdk.src.com.zoho.crm.api.modules import Module except Exception: from ..modules import Module if module is not None and not isinstance(module, Module): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: module EXPECTED TYPE: Module', None, None) self.__module = module self.__key_modified['module'] = 1 def get_type(self): """ The method to get the type Returns: string: A string representing the type """ return self.__type def set_type(self, type): """ The method to set the value to type Parameters: type (string) : A string representing the type """ if type is not None and not isinstance(type, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: type EXPECTED TYPE: str', None, None) self.__type = type self.__key_modified['type'] = 1 def get_created_by(self): """ The method to get the created_by Returns: User: An instance of User """ return self.__created_by def set_created_by(self, created_by): """ The method to set the value to created_by Parameters: created_by (User) : An instance of User """ try: from zcrmsdk.src.com.zoho.crm.api.users import User except Exception: from ..users import User if created_by is not None and not isinstance(created_by, User): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: created_by EXPECTED TYPE: User', None, None) self.__created_by = created_by self.__key_modified['created_by'] = 1 def get_modified_time(self): """ The method to get the modified_time Returns: datetime: An instance of datetime """ return self.__modified_time def set_modified_time(self, modified_time): """ The method to set the value to modified_time Parameters: modified_time (datetime) : An instance of datetime """ from datetime import datetime if modified_time is not None and not isinstance(modified_time, datetime): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modified_time EXPECTED TYPE: datetime', None, None) self.__modified_time = modified_time self.__key_modified['modified_time'] = 1 def get_last_usage_time(self): """ The method to get the last_usage_time Returns: datetime: An instance of datetime """ return self.__last_usage_time def set_last_usage_time(self, last_usage_time): """ The method to set the value to last_usage_time Parameters: last_usage_time (datetime) : An instance of datetime """ from datetime import datetime if last_usage_time is not None and not isinstance(last_usage_time, datetime): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: last_usage_time EXPECTED TYPE: datetime', None, None) self.__last_usage_time = last_usage_time self.__key_modified['last_usage_time'] = 1 def get_associated(self): """ The method to get the associated Returns: bool: A bool representing the associated """ return self.__associated def set_associated(self, associated): """ The method to set the value to associated Parameters: associated (bool) : A bool representing the associated """ if associated is not None and not isinstance(associated, bool): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: associated EXPECTED TYPE: bool', None, None) self.__associated = associated self.__key_modified['associated'] = 1 def get_name(self): """ The method to get the name Returns: string: A string representing the name """ return self.__name def set_name(self, name): """ The method to set the value to name Parameters: name (string) : A string representing the name """ if name is not None and not isinstance(name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: name EXPECTED TYPE: str', None, None) self.__name = name self.__key_modified['name'] = 1 def get_modified_by(self): """ The method to get the modified_by Returns: User: An instance of User """ return self.__modified_by def set_modified_by(self, modified_by): """ The method to set the value to modified_by Parameters: modified_by (User) : An instance of User """ try: from zcrmsdk.src.com.zoho.crm.api.users import User except Exception: from ..users import User if modified_by is not None and not isinstance(modified_by, User): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modified_by EXPECTED TYPE: User', None, None) self.__modified_by = modified_by self.__key_modified['modified_by'] = 1 def get_description(self): """ The method to get the description Returns: string: A string representing the description """ return self.__description def set_description(self, description): """ The method to set the value to description Parameters: description (string) : A string representing the description """ if description is not None and not isinstance(description, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: description EXPECTED TYPE: str', None, None) self.__description = description self.__key_modified['description'] = 1 def get_id(self): """ The method to get the id Returns: int: An int representing the id """ return self.__id def set_id(self, id): """ The method to set the value to id Parameters: id (int) : An int representing the id """ if id is not None and not isinstance(id, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: int', None, None) self.__id = id self.__key_modified['id'] = 1 def get_editor_mode(self): """ The method to get the editor_mode Returns: string: A string representing the editor_mode """ return self.__editor_mode def set_editor_mode(self, editor_mode): """ The method to set the value to editor_mode Parameters: editor_mode (string) : A string representing the editor_mode """ if editor_mode is not None and not isinstance(editor_mode, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: editor_mode EXPECTED TYPE: str', None, None) self.__editor_mode = editor_mode self.__key_modified['editor_mode'] = 1 def get_favorite(self): """ The method to get the favorite Returns: bool: A bool representing the favorite """ return self.__favorite def set_favorite(self, favorite): """ The method to set the value to favorite Parameters: favorite (bool) : A bool representing the favorite """ if favorite is not None and not isinstance(favorite, bool): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: favorite EXPECTED TYPE: bool', None, None) self.__favorite = favorite self.__key_modified['favorite'] = 1 def get_attachments(self): """ The method to get the attachments Returns: list: An instance of list """ return self.__attachments def set_attachments(self, attachments): """ The method to set the value to attachments Parameters: attachments (list) : An instance of list """ if attachments is not None and not isinstance(attachments, list): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: attachments EXPECTED TYPE: list', None, None) self.__attachments = attachments self.__key_modified['attachments'] = 1 def get_folder(self): """ The method to get the folder Returns: EmailTemplate: An instance of EmailTemplate """ return self.__folder def set_folder(self, folder): """ The method to set the value to folder Parameters: folder (EmailTemplate) : An instance of EmailTemplate """ try: from zcrmsdk.src.com.zoho.crm.api.email_templates.email_template import EmailTemplate except Exception: from .email_template import EmailTemplate if folder is not None and not isinstance(folder, EmailTemplate): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: folder EXPECTED TYPE: EmailTemplate', None, None) self.__folder = folder self.__key_modified['folder'] = 1 def get_consent_linked(self): """ The method to get the consent_linked Returns: bool: A bool representing the consent_linked """ return self.__consent_linked def set_consent_linked(self, consent_linked): """ The method to set the value to consent_linked Parameters: consent_linked (bool) : A bool representing the consent_linked """ if consent_linked is not None and not isinstance(consent_linked, bool): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: consent_linked EXPECTED TYPE: bool', None, None) self.__consent_linked = consent_linked self.__key_modified['consent_linked'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/email_templates/email_template.py
email_template.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants except Exception: from ..exception import SDKException from ..util import Constants class Attachment(object): def __init__(self): """Creates an instance of Attachment""" self.__size = None self.__file_name = None self.__file_id = None self.__id = None self.__key_modified = dict() def get_size(self): """ The method to get the size Returns: int: An int representing the size """ return self.__size def set_size(self, size): """ The method to set the value to size Parameters: size (int) : An int representing the size """ if size is not None and not isinstance(size, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: size EXPECTED TYPE: int', None, None) self.__size = size self.__key_modified['size'] = 1 def get_file_name(self): """ The method to get the file_name Returns: string: A string representing the file_name """ return self.__file_name def set_file_name(self, file_name): """ The method to set the value to file_name Parameters: file_name (string) : A string representing the file_name """ if file_name is not None and not isinstance(file_name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: file_name EXPECTED TYPE: str', None, None) self.__file_name = file_name self.__key_modified['file_name'] = 1 def get_file_id(self): """ The method to get the file_id Returns: string: A string representing the file_id """ return self.__file_id def set_file_id(self, file_id): """ The method to set the value to file_id Parameters: file_id (string) : A string representing the file_id """ if file_id is not None and not isinstance(file_id, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: file_id EXPECTED TYPE: str', None, None) self.__file_id = file_id self.__key_modified['file_id'] = 1 def get_id(self): """ The method to get the id Returns: int: An int representing the id """ return self.__id def set_id(self, id): """ The method to set the value to id Parameters: id (int) : An int representing the id """ if id is not None and not isinstance(id, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: int', None, None) self.__id = id self.__key_modified['id'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/email_templates/attachment.py
attachment.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants from zcrmsdk.src.com.zoho.crm.api.send_mail.action_handler import ActionHandler except Exception: from ..exception import SDKException from ..util import Constants from .action_handler import ActionHandler class ActionWrapper(ActionHandler): def __init__(self): """Creates an instance of ActionWrapper""" super().__init__() self.__data = None self.__key_modified = dict() def get_data(self): """ The method to get the data Returns: list: An instance of list """ return self.__data def set_data(self, data): """ The method to set the value to data Parameters: data (list) : An instance of list """ if data is not None and not isinstance(data, list): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: data EXPECTED TYPE: list', None, None) self.__data = data self.__key_modified['data'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/send_mail/action_wrapper.py
action_wrapper.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants from zcrmsdk.src.com.zoho.crm.api.send_mail.response_handler import ResponseHandler except Exception: from ..exception import SDKException from ..util import Constants from .response_handler import ResponseHandler class ResponseWrapper(ResponseHandler): def __init__(self): """Creates an instance of ResponseWrapper""" super().__init__() self.__from_addresses = None self.__key_modified = dict() def get_from_addresses(self): """ The method to get the from_addresses Returns: list: An instance of list """ return self.__from_addresses def set_from_addresses(self, from_addresses): """ The method to set the value to from_addresses Parameters: from_addresses (list) : An instance of list """ if from_addresses is not None and not isinstance(from_addresses, list): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: from_addresses EXPECTED TYPE: list', None, None) self.__from_addresses = from_addresses self.__key_modified['from_addresses'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/send_mail/response_wrapper.py
response_wrapper.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants except Exception: from ..exception import SDKException from ..util import Constants class UserAddress(object): def __init__(self): """Creates an instance of UserAddress""" self.__user_name = None self.__type = None self.__email = None self.__id = None self.__default = None self.__key_modified = dict() def get_user_name(self): """ The method to get the user_name Returns: string: A string representing the user_name """ return self.__user_name def set_user_name(self, user_name): """ The method to set the value to user_name Parameters: user_name (string) : A string representing the user_name """ if user_name is not None and not isinstance(user_name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: user_name EXPECTED TYPE: str', None, None) self.__user_name = user_name self.__key_modified['user_name'] = 1 def get_type(self): """ The method to get the type Returns: string: A string representing the type """ return self.__type def set_type(self, type): """ The method to set the value to type Parameters: type (string) : A string representing the type """ if type is not None and not isinstance(type, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: type EXPECTED TYPE: str', None, None) self.__type = type self.__key_modified['type'] = 1 def get_email(self): """ The method to get the email Returns: string: A string representing the email """ return self.__email def set_email(self, email): """ The method to set the value to email Parameters: email (string) : A string representing the email """ if email is not None and not isinstance(email, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: email EXPECTED TYPE: str', None, None) self.__email = email self.__key_modified['email'] = 1 def get_id(self): """ The method to get the id Returns: int: An int representing the id """ return self.__id def set_id(self, id): """ The method to set the value to id Parameters: id (int) : An int representing the id """ if id is not None and not isinstance(id, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: int', None, None) self.__id = id self.__key_modified['id'] = 1 def get_default(self): """ The method to get the default Returns: bool: A bool representing the default """ return self.__default def set_default(self, default): """ The method to set the value to default Parameters: default (bool) : A bool representing the default """ if default is not None and not isinstance(default, bool): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: default EXPECTED TYPE: bool', None, None) self.__default = default self.__key_modified['default'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/send_mail/user_address.py
user_address.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Choice, Constants from zcrmsdk.src.com.zoho.crm.api.send_mail.action_response import ActionResponse from zcrmsdk.src.com.zoho.crm.api.send_mail.response_handler import ResponseHandler from zcrmsdk.src.com.zoho.crm.api.send_mail.action_handler import ActionHandler except Exception: from ..exception import SDKException from ..util import Choice, Constants from .action_response import ActionResponse from .response_handler import ResponseHandler from .action_handler import ActionHandler class APIException(ResponseHandler, ActionResponse, ActionHandler): def __init__(self): """Creates an instance of APIException""" super().__init__() self.__status = None self.__code = None self.__message = None self.__details = None self.__key_modified = dict() def get_status(self): """ The method to get the status Returns: Choice: An instance of Choice """ return self.__status def set_status(self, status): """ The method to set the value to status Parameters: status (Choice) : An instance of Choice """ if status is not None and not isinstance(status, Choice): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: status EXPECTED TYPE: Choice', None, None) self.__status = status self.__key_modified['status'] = 1 def get_code(self): """ The method to get the code Returns: Choice: An instance of Choice """ return self.__code def set_code(self, code): """ The method to set the value to code Parameters: code (Choice) : An instance of Choice """ if code is not None and not isinstance(code, Choice): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: code EXPECTED TYPE: Choice', None, None) self.__code = code self.__key_modified['code'] = 1 def get_message(self): """ The method to get the message Returns: Choice: An instance of Choice """ return self.__message def set_message(self, message): """ The method to set the value to message Parameters: message (Choice) : An instance of Choice """ if message is not None and not isinstance(message, Choice): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: message EXPECTED TYPE: Choice', None, None) self.__message = message self.__key_modified['message'] = 1 def get_details(self): """ The method to get the details Returns: dict: An instance of dict """ return self.__details def set_details(self, details): """ The method to set the value to details Parameters: details (dict) : An instance of dict """ if details is not None and not isinstance(details, dict): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: details EXPECTED TYPE: dict', None, None) self.__details = details self.__key_modified['details'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/send_mail/api_exception.py
api_exception.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants except Exception: from ..exception import SDKException from ..util import Constants class DataSubjectRequest(object): def __init__(self): """Creates an instance of DataSubjectRequest""" self.__id = None self.__type = None self.__key_modified = dict() def get_id(self): """ The method to get the id Returns: int: An int representing the id """ return self.__id def set_id(self, id): """ The method to set the value to id Parameters: id (int) : An int representing the id """ if id is not None and not isinstance(id, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: int', None, None) self.__id = id self.__key_modified['id'] = 1 def get_type(self): """ The method to get the type Returns: string: A string representing the type """ return self.__type def set_type(self, type): """ The method to set the value to type Parameters: type (string) : A string representing the type """ if type is not None and not isinstance(type, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: type EXPECTED TYPE: str', None, None) self.__type = type self.__key_modified['type'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/send_mail/data_subject_request.py
data_subject_request.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import APIResponse, CommonAPIHandler, Constants except Exception: from ..exception import SDKException from ..util import APIResponse, CommonAPIHandler, Constants class SendMailOperations(object): def __init__(self): """Creates an instance of SendMailOperations""" pass def get_email_addresses(self): """ The method to get email addresses Returns: APIResponse: An instance of APIResponse Raises: SDKException """ handler_instance = CommonAPIHandler() api_path = '' api_path = api_path + '/crm/v2.1/settings/emails/actions/from_addresses' handler_instance.set_api_path(api_path) handler_instance.set_http_method(Constants.REQUEST_METHOD_GET) handler_instance.set_category_method(Constants.REQUEST_CATEGORY_READ) try: from zcrmsdk.src.com.zoho.crm.api.send_mail.response_handler import ResponseHandler except Exception: from .response_handler import ResponseHandler return handler_instance.api_call(ResponseHandler.__module__, 'application/json') def send_mail(self, record_id, module_api_name, request): """ The method to send mail Parameters: record_id (int) : An int representing the record_id module_api_name (string) : A string representing the module_api_name request (BodyWrapper) : An instance of BodyWrapper Returns: APIResponse: An instance of APIResponse Raises: SDKException """ try: from zcrmsdk.src.com.zoho.crm.api.send_mail.body_wrapper import BodyWrapper except Exception: from .body_wrapper import BodyWrapper if not isinstance(record_id, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: record_id EXPECTED TYPE: int', None, None) if not isinstance(module_api_name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: module_api_name EXPECTED TYPE: str', None, None) if request is not None and not isinstance(request, BodyWrapper): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: request EXPECTED TYPE: BodyWrapper', None, None) handler_instance = CommonAPIHandler() api_path = '' api_path = api_path + '/crm/v2.1/' api_path = api_path + str(module_api_name) api_path = api_path + '/' api_path = api_path + str(record_id) api_path = api_path + '/actions/send_mail' handler_instance.set_api_path(api_path) handler_instance.set_http_method(Constants.REQUEST_METHOD_POST) handler_instance.set_category_method(Constants.REQUEST_CATEGORY_CREATE) handler_instance.set_content_type('application/json') handler_instance.set_request(request) handler_instance.set_mandatory_checker(True) try: from zcrmsdk.src.com.zoho.crm.api.send_mail.action_handler import ActionHandler except Exception: from .action_handler import ActionHandler return handler_instance.api_call(ActionHandler.__module__, 'application/json')
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/send_mail/send_mail_operations.py
send_mail_operations.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants except Exception: from ..exception import SDKException from ..util import Constants class Mail(object): def __init__(self): """Creates an instance of Mail""" self.__from_1 = None self.__to = None self.__cc = None self.__bcc = None self.__reply_to = None self.__template = None self.__email = None self.__id = None self.__in_reply_to = None self.__scheduled_time = None self.__subject = None self.__content = None self.__paper_type = None self.__view_type = None self.__mail_format = None self.__consent_email = None self.__org_email = None self.__attachments = None self.__inventory_details = None self.__data_subject_request = None self.__key_modified = dict() def get_from(self): """ The method to get the from Returns: UserAddress: An instance of UserAddress """ return self.__from_1 def set_from(self, from_1): """ The method to set the value to from Parameters: from_1 (UserAddress) : An instance of UserAddress """ try: from zcrmsdk.src.com.zoho.crm.api.send_mail.user_address import UserAddress except Exception: from .user_address import UserAddress if from_1 is not None and not isinstance(from_1, UserAddress): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: from_1 EXPECTED TYPE: UserAddress', None, None) self.__from_1 = from_1 self.__key_modified['from'] = 1 def get_to(self): """ The method to get the to Returns: list: An instance of list """ return self.__to def set_to(self, to): """ The method to set the value to to Parameters: to (list) : An instance of list """ if to is not None and not isinstance(to, list): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: to EXPECTED TYPE: list', None, None) self.__to = to self.__key_modified['to'] = 1 def get_cc(self): """ The method to get the cc Returns: list: An instance of list """ return self.__cc def set_cc(self, cc): """ The method to set the value to cc Parameters: cc (list) : An instance of list """ if cc is not None and not isinstance(cc, list): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: cc EXPECTED TYPE: list', None, None) self.__cc = cc self.__key_modified['cc'] = 1 def get_bcc(self): """ The method to get the bcc Returns: list: An instance of list """ return self.__bcc def set_bcc(self, bcc): """ The method to set the value to bcc Parameters: bcc (list) : An instance of list """ if bcc is not None and not isinstance(bcc, list): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: bcc EXPECTED TYPE: list', None, None) self.__bcc = bcc self.__key_modified['bcc'] = 1 def get_reply_to(self): """ The method to get the reply_to Returns: UserAddress: An instance of UserAddress """ return self.__reply_to def set_reply_to(self, reply_to): """ The method to set the value to reply_to Parameters: reply_to (UserAddress) : An instance of UserAddress """ try: from zcrmsdk.src.com.zoho.crm.api.send_mail.user_address import UserAddress except Exception: from .user_address import UserAddress if reply_to is not None and not isinstance(reply_to, UserAddress): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: reply_to EXPECTED TYPE: UserAddress', None, None) self.__reply_to = reply_to self.__key_modified['reply_to'] = 1 def get_template(self): """ The method to get the template Returns: Template: An instance of Template """ return self.__template def set_template(self, template): """ The method to set the value to template Parameters: template (Template) : An instance of Template """ try: from zcrmsdk.src.com.zoho.crm.api.send_mail.template import Template except Exception: from .template import Template if template is not None and not isinstance(template, Template): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: template EXPECTED TYPE: Template', None, None) self.__template = template self.__key_modified['template'] = 1 def get_email(self): """ The method to get the email Returns: int: An int representing the email """ return self.__email def set_email(self, email): """ The method to set the value to email Parameters: email (int) : An int representing the email """ if email is not None and not isinstance(email, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: email EXPECTED TYPE: int', None, None) self.__email = email self.__key_modified['email'] = 1 def get_id(self): """ The method to get the id Returns: int: An int representing the id """ return self.__id def set_id(self, id): """ The method to set the value to id Parameters: id (int) : An int representing the id """ if id is not None and not isinstance(id, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: int', None, None) self.__id = id self.__key_modified['id'] = 1 def get_in_reply_to(self): """ The method to get the in_reply_to Returns: string: A string representing the in_reply_to """ return self.__in_reply_to def set_in_reply_to(self, in_reply_to): """ The method to set the value to in_reply_to Parameters: in_reply_to (string) : A string representing the in_reply_to """ if in_reply_to is not None and not isinstance(in_reply_to, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: in_reply_to EXPECTED TYPE: str', None, None) self.__in_reply_to = in_reply_to self.__key_modified['in_reply_to'] = 1 def get_scheduled_time(self): """ The method to get the scheduled_time Returns: datetime: An instance of datetime """ return self.__scheduled_time def set_scheduled_time(self, scheduled_time): """ The method to set the value to scheduled_time Parameters: scheduled_time (datetime) : An instance of datetime """ from datetime import datetime if scheduled_time is not None and not isinstance(scheduled_time, datetime): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: scheduled_time EXPECTED TYPE: datetime', None, None) self.__scheduled_time = scheduled_time self.__key_modified['scheduled_time'] = 1 def get_subject(self): """ The method to get the subject Returns: string: A string representing the subject """ return self.__subject def set_subject(self, subject): """ The method to set the value to subject Parameters: subject (string) : A string representing the subject """ if subject is not None and not isinstance(subject, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: subject EXPECTED TYPE: str', None, None) self.__subject = subject self.__key_modified['subject'] = 1 def get_content(self): """ The method to get the content Returns: string: A string representing the content """ return self.__content def set_content(self, content): """ The method to set the value to content Parameters: content (string) : A string representing the content """ if content is not None and not isinstance(content, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: content EXPECTED TYPE: str', None, None) self.__content = content self.__key_modified['content'] = 1 def get_paper_type(self): """ The method to get the paper_type Returns: string: A string representing the paper_type """ return self.__paper_type def set_paper_type(self, paper_type): """ The method to set the value to paper_type Parameters: paper_type (string) : A string representing the paper_type """ if paper_type is not None and not isinstance(paper_type, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: paper_type EXPECTED TYPE: str', None, None) self.__paper_type = paper_type self.__key_modified['paper_type'] = 1 def get_view_type(self): """ The method to get the view_type Returns: string: A string representing the view_type """ return self.__view_type def set_view_type(self, view_type): """ The method to set the value to view_type Parameters: view_type (string) : A string representing the view_type """ if view_type is not None and not isinstance(view_type, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: view_type EXPECTED TYPE: str', None, None) self.__view_type = view_type self.__key_modified['view_type'] = 1 def get_mail_format(self): """ The method to get the mail_format Returns: string: A string representing the mail_format """ return self.__mail_format def set_mail_format(self, mail_format): """ The method to set the value to mail_format Parameters: mail_format (string) : A string representing the mail_format """ if mail_format is not None and not isinstance(mail_format, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: mail_format EXPECTED TYPE: str', None, None) self.__mail_format = mail_format self.__key_modified['mail_format'] = 1 def get_consent_email(self): """ The method to get the consent_email Returns: bool: A bool representing the consent_email """ return self.__consent_email def set_consent_email(self, consent_email): """ The method to set the value to consent_email Parameters: consent_email (bool) : A bool representing the consent_email """ if consent_email is not None and not isinstance(consent_email, bool): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: consent_email EXPECTED TYPE: bool', None, None) self.__consent_email = consent_email self.__key_modified['consent_email'] = 1 def get_org_email(self): """ The method to get the org_email Returns: bool: A bool representing the org_email """ return self.__org_email def set_org_email(self, org_email): """ The method to set the value to org_email Parameters: org_email (bool) : A bool representing the org_email """ if org_email is not None and not isinstance(org_email, bool): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: org_email EXPECTED TYPE: bool', None, None) self.__org_email = org_email self.__key_modified['org_email'] = 1 def get_attachments(self): """ The method to get the attachments Returns: list: An instance of list """ return self.__attachments def set_attachments(self, attachments): """ The method to set the value to attachments Parameters: attachments (list) : An instance of list """ if attachments is not None and not isinstance(attachments, list): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: attachments EXPECTED TYPE: list', None, None) self.__attachments = attachments self.__key_modified['attachments'] = 1 def get_inventory_details(self): """ The method to get the inventory_details Returns: InventoryDetails: An instance of InventoryDetails """ return self.__inventory_details def set_inventory_details(self, inventory_details): """ The method to set the value to inventory_details Parameters: inventory_details (InventoryDetails) : An instance of InventoryDetails """ try: from zcrmsdk.src.com.zoho.crm.api.send_mail.inventory_details import InventoryDetails except Exception: from .inventory_details import InventoryDetails if inventory_details is not None and not isinstance(inventory_details, InventoryDetails): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: inventory_details EXPECTED TYPE: InventoryDetails', None, None) self.__inventory_details = inventory_details self.__key_modified['inventory_details'] = 1 def get_data_subject_request(self): """ The method to get the data_subject_request Returns: DataSubjectRequest: An instance of DataSubjectRequest """ return self.__data_subject_request def set_data_subject_request(self, data_subject_request): """ The method to set the value to data_subject_request Parameters: data_subject_request (DataSubjectRequest) : An instance of DataSubjectRequest """ try: from zcrmsdk.src.com.zoho.crm.api.send_mail.data_subject_request import DataSubjectRequest except Exception: from .data_subject_request import DataSubjectRequest if data_subject_request is not None and not isinstance(data_subject_request, DataSubjectRequest): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: data_subject_request EXPECTED TYPE: DataSubjectRequest', None, None) self.__data_subject_request = data_subject_request self.__key_modified['data_subject_request'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/send_mail/mail.py
mail.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants except Exception: from ..exception import SDKException from ..util import Constants class InventoryDetails(object): def __init__(self): """Creates an instance of InventoryDetails""" self.__inventory_template = None self.__paper_type = None self.__view_type = None self.__key_modified = dict() def get_inventory_template(self): """ The method to get the inventory_template Returns: InventoryTemplate: An instance of InventoryTemplate """ return self.__inventory_template def set_inventory_template(self, inventory_template): """ The method to set the value to inventory_template Parameters: inventory_template (InventoryTemplate) : An instance of InventoryTemplate """ try: from zcrmsdk.src.com.zoho.crm.api.inventorytemplates import InventoryTemplate except Exception: from ..inventory_templates import InventoryTemplate if inventory_template is not None and not isinstance(inventory_template, InventoryTemplate): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: inventory_template EXPECTED TYPE: InventoryTemplate', None, None) self.__inventory_template = inventory_template self.__key_modified['inventory_template'] = 1 def get_paper_type(self): """ The method to get the paper_type Returns: string: A string representing the paper_type """ return self.__paper_type def set_paper_type(self, paper_type): """ The method to set the value to paper_type Parameters: paper_type (string) : A string representing the paper_type """ if paper_type is not None and not isinstance(paper_type, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: paper_type EXPECTED TYPE: str', None, None) self.__paper_type = paper_type self.__key_modified['paper_type'] = 1 def get_view_type(self): """ The method to get the view_type Returns: string: A string representing the view_type """ return self.__view_type def set_view_type(self, view_type): """ The method to set the value to view_type Parameters: view_type (string) : A string representing the view_type """ if view_type is not None and not isinstance(view_type, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: view_type EXPECTED TYPE: str', None, None) self.__view_type = view_type self.__key_modified['view_type'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/send_mail/inventory_details.py
inventory_details.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Choice, Constants from zcrmsdk.src.com.zoho.crm.api.send_mail.action_response import ActionResponse except Exception: from ..exception import SDKException from ..util import Choice, Constants from .action_response import ActionResponse class SuccessResponse(ActionResponse): def __init__(self): """Creates an instance of SuccessResponse""" super().__init__() self.__status = None self.__code = None self.__message = None self.__details = None self.__key_modified = dict() def get_status(self): """ The method to get the status Returns: Choice: An instance of Choice """ return self.__status def set_status(self, status): """ The method to set the value to status Parameters: status (Choice) : An instance of Choice """ if status is not None and not isinstance(status, Choice): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: status EXPECTED TYPE: Choice', None, None) self.__status = status self.__key_modified['status'] = 1 def get_code(self): """ The method to get the code Returns: Choice: An instance of Choice """ return self.__code def set_code(self, code): """ The method to set the value to code Parameters: code (Choice) : An instance of Choice """ if code is not None and not isinstance(code, Choice): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: code EXPECTED TYPE: Choice', None, None) self.__code = code self.__key_modified['code'] = 1 def get_message(self): """ The method to get the message Returns: Choice: An instance of Choice """ return self.__message def set_message(self, message): """ The method to set the value to message Parameters: message (Choice) : An instance of Choice """ if message is not None and not isinstance(message, Choice): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: message EXPECTED TYPE: Choice', None, None) self.__message = message self.__key_modified['message'] = 1 def get_details(self): """ The method to get the details Returns: dict: An instance of dict """ return self.__details def set_details(self, details): """ The method to set the value to details Parameters: details (dict) : An instance of dict """ if details is not None and not isinstance(details, dict): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: details EXPECTED TYPE: dict', None, None) self.__details = details self.__key_modified['details'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/send_mail/success_response.py
success_response.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants from zcrmsdk.src.com.zoho.crm.api.users.action_handler import ActionHandler except Exception: from ..exception import SDKException from ..util import Constants from .action_handler import ActionHandler class ActionWrapper(ActionHandler): def __init__(self): """Creates an instance of ActionWrapper""" super().__init__() self.__users = None self.__key_modified = dict() def get_users(self): """ The method to get the users Returns: list: An instance of list """ return self.__users def set_users(self, users): """ The method to set the value to users Parameters: users (list) : An instance of list """ if users is not None and not isinstance(users, list): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: users EXPECTED TYPE: list', None, None) self.__users = users self.__key_modified['users'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/users/action_wrapper.py
action_wrapper.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants from zcrmsdk.src.com.zoho.crm.api.users.response_handler import ResponseHandler except Exception: from ..exception import SDKException from ..util import Constants from .response_handler import ResponseHandler class ResponseWrapper(ResponseHandler): def __init__(self): """Creates an instance of ResponseWrapper""" super().__init__() self.__users = None self.__info = None self.__key_modified = dict() def get_users(self): """ The method to get the users Returns: list: An instance of list """ return self.__users def set_users(self, users): """ The method to set the value to users Parameters: users (list) : An instance of list """ if users is not None and not isinstance(users, list): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: users EXPECTED TYPE: list', None, None) self.__users = users self.__key_modified['users'] = 1 def get_info(self): """ The method to get the info Returns: Info: An instance of Info """ return self.__info def set_info(self, info): """ The method to set the value to info Parameters: info (Info) : An instance of Info """ try: from zcrmsdk.src.com.zoho.crm.api.users.info import Info except Exception: from .info import Info if info is not None and not isinstance(info, Info): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: info EXPECTED TYPE: Info', None, None) self.__info = info self.__key_modified['info'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/users/response_wrapper.py
response_wrapper.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants except Exception: from ..exception import SDKException from ..util import Constants class Territory(object): def __init__(self): """Creates an instance of Territory""" self.__manager = None self.__name = None self.__id = None self.__key_modified = dict() def get_manager(self): """ The method to get the manager Returns: bool: A bool representing the manager """ return self.__manager def set_manager(self, manager): """ The method to set the value to manager Parameters: manager (bool) : A bool representing the manager """ if manager is not None and not isinstance(manager, bool): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: manager EXPECTED TYPE: bool', None, None) self.__manager = manager self.__key_modified['manager'] = 1 def get_name(self): """ The method to get the name Returns: string: A string representing the name """ return self.__name def set_name(self, name): """ The method to set the value to name Parameters: name (string) : A string representing the name """ if name is not None and not isinstance(name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: name EXPECTED TYPE: str', None, None) self.__name = name self.__key_modified['name'] = 1 def get_id(self): """ The method to get the id Returns: int: An int representing the id """ return self.__id def set_id(self, id): """ The method to set the value to id Parameters: id (int) : An int representing the id """ if id is not None and not isinstance(id, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: int', None, None) self.__id = id self.__key_modified['id'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/users/territory.py
territory.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Choice, Constants from zcrmsdk.src.com.zoho.crm.api.users.action_response import ActionResponse from zcrmsdk.src.com.zoho.crm.api.users.response_handler import ResponseHandler from zcrmsdk.src.com.zoho.crm.api.users.action_handler import ActionHandler except Exception: from ..exception import SDKException from ..util import Choice, Constants from .action_response import ActionResponse from .response_handler import ResponseHandler from .action_handler import ActionHandler class APIException(ResponseHandler, ActionResponse, ActionHandler): def __init__(self): """Creates an instance of APIException""" super().__init__() self.__status = None self.__code = None self.__message = None self.__details = None self.__key_modified = dict() def get_status(self): """ The method to get the status Returns: Choice: An instance of Choice """ return self.__status def set_status(self, status): """ The method to set the value to status Parameters: status (Choice) : An instance of Choice """ if status is not None and not isinstance(status, Choice): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: status EXPECTED TYPE: Choice', None, None) self.__status = status self.__key_modified['status'] = 1 def get_code(self): """ The method to get the code Returns: Choice: An instance of Choice """ return self.__code def set_code(self, code): """ The method to set the value to code Parameters: code (Choice) : An instance of Choice """ if code is not None and not isinstance(code, Choice): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: code EXPECTED TYPE: Choice', None, None) self.__code = code self.__key_modified['code'] = 1 def get_message(self): """ The method to get the message Returns: Choice: An instance of Choice """ return self.__message def set_message(self, message): """ The method to set the value to message Parameters: message (Choice) : An instance of Choice """ if message is not None and not isinstance(message, Choice): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: message EXPECTED TYPE: Choice', None, None) self.__message = message self.__key_modified['message'] = 1 def get_details(self): """ The method to get the details Returns: dict: An instance of dict """ return self.__details def set_details(self, details): """ The method to set the value to details Parameters: details (dict) : An instance of dict """ if details is not None and not isinstance(details, dict): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: details EXPECTED TYPE: dict', None, None) self.__details = details self.__key_modified['details'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/users/api_exception.py
api_exception.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants except Exception: from ..exception import SDKException from ..util import Constants class Info(object): def __init__(self): """Creates an instance of Info""" self.__per_page = None self.__count = None self.__page = None self.__more_records = None self.__key_modified = dict() def get_per_page(self): """ The method to get the per_page Returns: int: An int representing the per_page """ return self.__per_page def set_per_page(self, per_page): """ The method to set the value to per_page Parameters: per_page (int) : An int representing the per_page """ if per_page is not None and not isinstance(per_page, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: per_page EXPECTED TYPE: int', None, None) self.__per_page = per_page self.__key_modified['per_page'] = 1 def get_count(self): """ The method to get the count Returns: int: An int representing the count """ return self.__count def set_count(self, count): """ The method to set the value to count Parameters: count (int) : An int representing the count """ if count is not None and not isinstance(count, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: count EXPECTED TYPE: int', None, None) self.__count = count self.__key_modified['count'] = 1 def get_page(self): """ The method to get the page Returns: int: An int representing the page """ return self.__page def set_page(self, page): """ The method to set the value to page Parameters: page (int) : An int representing the page """ if page is not None and not isinstance(page, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: page EXPECTED TYPE: int', None, None) self.__page = page self.__key_modified['page'] = 1 def get_more_records(self): """ The method to get the more_records Returns: bool: A bool representing the more_records """ return self.__more_records def set_more_records(self, more_records): """ The method to set the value to more_records Parameters: more_records (bool) : A bool representing the more_records """ if more_records is not None and not isinstance(more_records, bool): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: more_records EXPECTED TYPE: bool', None, None) self.__more_records = more_records self.__key_modified['more_records'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/users/info.py
info.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants except Exception: from ..exception import SDKException from ..util import Constants class Theme(object): def __init__(self): """Creates an instance of Theme""" self.__normal_tab = None self.__selected_tab = None self.__new_background = None self.__background = None self.__screen = None self.__type = None self.__key_modified = dict() def get_normal_tab(self): """ The method to get the normal_tab Returns: TabTheme: An instance of TabTheme """ return self.__normal_tab def set_normal_tab(self, normal_tab): """ The method to set the value to normal_tab Parameters: normal_tab (TabTheme) : An instance of TabTheme """ try: from zcrmsdk.src.com.zoho.crm.api.users.tab_theme import TabTheme except Exception: from .tab_theme import TabTheme if normal_tab is not None and not isinstance(normal_tab, TabTheme): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: normal_tab EXPECTED TYPE: TabTheme', None, None) self.__normal_tab = normal_tab self.__key_modified['normal_tab'] = 1 def get_selected_tab(self): """ The method to get the selected_tab Returns: TabTheme: An instance of TabTheme """ return self.__selected_tab def set_selected_tab(self, selected_tab): """ The method to set the value to selected_tab Parameters: selected_tab (TabTheme) : An instance of TabTheme """ try: from zcrmsdk.src.com.zoho.crm.api.users.tab_theme import TabTheme except Exception: from .tab_theme import TabTheme if selected_tab is not None and not isinstance(selected_tab, TabTheme): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: selected_tab EXPECTED TYPE: TabTheme', None, None) self.__selected_tab = selected_tab self.__key_modified['selected_tab'] = 1 def get_new_background(self): """ The method to get the new_background Returns: string: A string representing the new_background """ return self.__new_background def set_new_background(self, new_background): """ The method to set the value to new_background Parameters: new_background (string) : A string representing the new_background """ if new_background is not None and not isinstance(new_background, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: new_background EXPECTED TYPE: str', None, None) self.__new_background = new_background self.__key_modified['new_background'] = 1 def get_background(self): """ The method to get the background Returns: string: A string representing the background """ return self.__background def set_background(self, background): """ The method to set the value to background Parameters: background (string) : A string representing the background """ if background is not None and not isinstance(background, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: background EXPECTED TYPE: str', None, None) self.__background = background self.__key_modified['background'] = 1 def get_screen(self): """ The method to get the screen Returns: string: A string representing the screen """ return self.__screen def set_screen(self, screen): """ The method to set the value to screen Parameters: screen (string) : A string representing the screen """ if screen is not None and not isinstance(screen, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: screen EXPECTED TYPE: str', None, None) self.__screen = screen self.__key_modified['screen'] = 1 def get_type(self): """ The method to get the type Returns: string: A string representing the type """ return self.__type def set_type(self, type): """ The method to set the value to type Parameters: type (string) : A string representing the type """ if type is not None and not isinstance(type, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: type EXPECTED TYPE: str', None, None) self.__type = type self.__key_modified['type'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/users/theme.py
theme.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.parameter_map import ParameterMap from zcrmsdk.src.com.zoho.crm.api.util import APIResponse, CommonAPIHandler, Constants from zcrmsdk.src.com.zoho.crm.api.param import Param from zcrmsdk.src.com.zoho.crm.api.header import Header from zcrmsdk.src.com.zoho.crm.api.header_map import HeaderMap except Exception: from ..exception import SDKException from ..parameter_map import ParameterMap from ..util import APIResponse, CommonAPIHandler, Constants from ..param import Param from ..header import Header from ..header_map import HeaderMap class UsersOperations(object): def __init__(self): """Creates an instance of UsersOperations""" pass def get_users(self, param_instance=None, header_instance=None): """ The method to get users Parameters: param_instance (ParameterMap) : An instance of ParameterMap header_instance (HeaderMap) : An instance of HeaderMap Returns: APIResponse: An instance of APIResponse Raises: SDKException """ if param_instance is not None and not isinstance(param_instance, ParameterMap): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: param_instance EXPECTED TYPE: ParameterMap', None, None) if header_instance is not None and not isinstance(header_instance, HeaderMap): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: header_instance EXPECTED TYPE: HeaderMap', None, None) handler_instance = CommonAPIHandler() api_path = '' api_path = api_path + '/crm/v2.1/users' handler_instance.set_api_path(api_path) handler_instance.set_http_method(Constants.REQUEST_METHOD_GET) handler_instance.set_category_method(Constants.REQUEST_CATEGORY_READ) handler_instance.set_param(param_instance) handler_instance.set_header(header_instance) try: from zcrmsdk.src.com.zoho.crm.api.users.response_handler import ResponseHandler except Exception: from .response_handler import ResponseHandler return handler_instance.api_call(ResponseHandler.__module__, 'application/json') def create_user(self, request): """ The method to create user Parameters: request (RequestWrapper) : An instance of RequestWrapper Returns: APIResponse: An instance of APIResponse Raises: SDKException """ try: from zcrmsdk.src.com.zoho.crm.api.users.request_wrapper import RequestWrapper except Exception: from .request_wrapper import RequestWrapper if request is not None and not isinstance(request, RequestWrapper): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: request EXPECTED TYPE: RequestWrapper', None, None) handler_instance = CommonAPIHandler() api_path = '' api_path = api_path + '/crm/v2.1/users' handler_instance.set_api_path(api_path) handler_instance.set_http_method(Constants.REQUEST_METHOD_POST) handler_instance.set_category_method(Constants.REQUEST_CATEGORY_CREATE) handler_instance.set_content_type('application/json') handler_instance.set_request(request) handler_instance.set_mandatory_checker(True) try: from zcrmsdk.src.com.zoho.crm.api.users.action_handler import ActionHandler except Exception: from .action_handler import ActionHandler return handler_instance.api_call(ActionHandler.__module__, 'application/json') def update_users(self, request): """ The method to update users Parameters: request (BodyWrapper) : An instance of BodyWrapper Returns: APIResponse: An instance of APIResponse Raises: SDKException """ try: from zcrmsdk.src.com.zoho.crm.api.users.body_wrapper import BodyWrapper except Exception: from .body_wrapper import BodyWrapper if request is not None and not isinstance(request, BodyWrapper): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: request EXPECTED TYPE: BodyWrapper', None, None) handler_instance = CommonAPIHandler() api_path = '' api_path = api_path + '/crm/v2.1/users' handler_instance.set_api_path(api_path) handler_instance.set_http_method(Constants.REQUEST_METHOD_PUT) handler_instance.set_category_method(Constants.REQUEST_CATEGORY_UPDATE) handler_instance.set_content_type('application/json') handler_instance.set_request(request) handler_instance.set_mandatory_checker(True) try: from zcrmsdk.src.com.zoho.crm.api.users.action_handler import ActionHandler except Exception: from .action_handler import ActionHandler return handler_instance.api_call(ActionHandler.__module__, 'application/json') def get_user(self, id, header_instance=None): """ The method to get user Parameters: id (int) : An int representing the id header_instance (HeaderMap) : An instance of HeaderMap Returns: APIResponse: An instance of APIResponse Raises: SDKException """ if not isinstance(id, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: int', None, None) if header_instance is not None and not isinstance(header_instance, HeaderMap): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: header_instance EXPECTED TYPE: HeaderMap', None, None) handler_instance = CommonAPIHandler() api_path = '' api_path = api_path + '/crm/v2.1/users/' api_path = api_path + str(id) handler_instance.set_api_path(api_path) handler_instance.set_http_method(Constants.REQUEST_METHOD_GET) handler_instance.set_category_method(Constants.REQUEST_CATEGORY_READ) handler_instance.set_header(header_instance) try: from zcrmsdk.src.com.zoho.crm.api.users.response_handler import ResponseHandler except Exception: from .response_handler import ResponseHandler return handler_instance.api_call(ResponseHandler.__module__, 'application/json') def update_user(self, id, request): """ The method to update user Parameters: id (int) : An int representing the id request (BodyWrapper) : An instance of BodyWrapper Returns: APIResponse: An instance of APIResponse Raises: SDKException """ try: from zcrmsdk.src.com.zoho.crm.api.users.body_wrapper import BodyWrapper except Exception: from .body_wrapper import BodyWrapper if not isinstance(id, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: int', None, None) if request is not None and not isinstance(request, BodyWrapper): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: request EXPECTED TYPE: BodyWrapper', None, None) handler_instance = CommonAPIHandler() api_path = '' api_path = api_path + '/crm/v2.1/users/' api_path = api_path + str(id) handler_instance.set_api_path(api_path) handler_instance.set_http_method(Constants.REQUEST_METHOD_PUT) handler_instance.set_category_method(Constants.REQUEST_CATEGORY_UPDATE) handler_instance.set_content_type('application/json') handler_instance.set_request(request) try: from zcrmsdk.src.com.zoho.crm.api.users.action_handler import ActionHandler except Exception: from .action_handler import ActionHandler return handler_instance.api_call(ActionHandler.__module__, 'application/json') def delete_user(self, id): """ The method to delete user Parameters: id (int) : An int representing the id Returns: APIResponse: An instance of APIResponse Raises: SDKException """ if not isinstance(id, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: int', None, None) handler_instance = CommonAPIHandler() api_path = '' api_path = api_path + '/crm/v2.1/users/' api_path = api_path + str(id) handler_instance.set_api_path(api_path) handler_instance.set_http_method(Constants.REQUEST_METHOD_DELETE) handler_instance.set_category_method(Constants.REQUEST_METHOD_DELETE) try: from zcrmsdk.src.com.zoho.crm.api.users.action_handler import ActionHandler except Exception: from .action_handler import ActionHandler return handler_instance.api_call(ActionHandler.__module__, 'application/json') class GetUsersParam(object): type = Param('type', 'com.zoho.crm.api.Users.GetUsersParam') page = Param('page', 'com.zoho.crm.api.Users.GetUsersParam') per_page = Param('per_page', 'com.zoho.crm.api.Users.GetUsersParam') class GetUsersHeader(object): if_modified_since = Header('If-Modified-Since', 'com.zoho.crm.api.Users.GetUsersHeader') class GetUserHeader(object): if_modified_since = Header('If-Modified-Since', 'com.zoho.crm.api.Users.GetUserHeader')
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/users/users_operations.py
users_operations.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants from zcrmsdk.src.com.zoho.crm.api.record import Record except Exception: from ..exception import SDKException from ..util import Constants from ..record import Record class User(Record): def __init__(self): """Creates an instance of User""" super().__init__() def get_country(self): """ The method to get the country Returns: string: A string representing the country """ return self.get_key_value('country') def set_country(self, country): """ The method to set the value to country Parameters: country (string) : A string representing the country """ if country is not None and not isinstance(country, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: country EXPECTED TYPE: str', None, None) self.add_key_value('country', country) def get_customize_info(self): """ The method to get the customize_info Returns: CustomizeInfo: An instance of CustomizeInfo """ return self.get_key_value('customize_info') def set_customize_info(self, customize_info): """ The method to set the value to customize_info Parameters: customize_info (CustomizeInfo) : An instance of CustomizeInfo """ try: from zcrmsdk.src.com.zoho.crm.api.users.customize_info import CustomizeInfo except Exception: from .customize_info import CustomizeInfo if customize_info is not None and not isinstance(customize_info, CustomizeInfo): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: customize_info EXPECTED TYPE: CustomizeInfo', None, None) self.add_key_value('customize_info', customize_info) def get_role(self): """ The method to get the role Returns: Role: An instance of Role """ return self.get_key_value('role') def set_role(self, role): """ The method to set the value to role Parameters: role (Role) : An instance of Role """ try: from zcrmsdk.src.com.zoho.crm.api.roles import Role except Exception: from ..roles import Role if role is not None and not isinstance(role, Role): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: role EXPECTED TYPE: Role', None, None) self.add_key_value('role', role) def get_signature(self): """ The method to get the signature Returns: string: A string representing the signature """ return self.get_key_value('signature') def set_signature(self, signature): """ The method to set the value to signature Parameters: signature (string) : A string representing the signature """ if signature is not None and not isinstance(signature, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: signature EXPECTED TYPE: str', None, None) self.add_key_value('signature', signature) def get_sort_order_preference(self): """ The method to get the sort_order_preference Returns: string: A string representing the sort_order_preference """ return self.get_key_value('sort_order_preference') def set_sort_order_preference(self, sort_order_preference): """ The method to set the value to sort_order_preference Parameters: sort_order_preference (string) : A string representing the sort_order_preference """ if sort_order_preference is not None and not isinstance(sort_order_preference, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: sort_order_preference EXPECTED TYPE: str', None, None) self.add_key_value('sort_order_preference', sort_order_preference) def get_city(self): """ The method to get the city Returns: string: A string representing the city """ return self.get_key_value('city') def set_city(self, city): """ The method to set the value to city Parameters: city (string) : A string representing the city """ if city is not None and not isinstance(city, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: city EXPECTED TYPE: str', None, None) self.add_key_value('city', city) def get_name_format(self): """ The method to get the name_format Returns: string: A string representing the name_format """ return self.get_key_value('name_format') def set_name_format(self, name_format): """ The method to set the value to name_format Parameters: name_format (string) : A string representing the name_format """ if name_format is not None and not isinstance(name_format, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: name_format EXPECTED TYPE: str', None, None) self.add_key_value('name_format', name_format) def get_personal_account(self): """ The method to get the personal_account Returns: bool: A bool representing the personal_account """ return self.get_key_value('personal_account') def set_personal_account(self, personal_account): """ The method to set the value to personal_account Parameters: personal_account (bool) : A bool representing the personal_account """ if personal_account is not None and not isinstance(personal_account, bool): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: personal_account EXPECTED TYPE: bool', None, None) self.add_key_value('personal_account', personal_account) def get_default_tab_group(self): """ The method to get the default_tab_group Returns: string: A string representing the default_tab_group """ return self.get_key_value('default_tab_group') def set_default_tab_group(self, default_tab_group): """ The method to set the value to default_tab_group Parameters: default_tab_group (string) : A string representing the default_tab_group """ if default_tab_group is not None and not isinstance(default_tab_group, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: default_tab_group EXPECTED TYPE: str', None, None) self.add_key_value('default_tab_group', default_tab_group) def get_language(self): """ The method to get the language Returns: string: A string representing the language """ return self.get_key_value('language') def set_language(self, language): """ The method to set the value to language Parameters: language (string) : A string representing the language """ if language is not None and not isinstance(language, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: language EXPECTED TYPE: str', None, None) self.add_key_value('language', language) def get_locale(self): """ The method to get the locale Returns: string: A string representing the locale """ return self.get_key_value('locale') def set_locale(self, locale): """ The method to set the value to locale Parameters: locale (string) : A string representing the locale """ if locale is not None and not isinstance(locale, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: locale EXPECTED TYPE: str', None, None) self.add_key_value('locale', locale) def get_microsoft(self): """ The method to get the microsoft Returns: bool: A bool representing the microsoft """ return self.get_key_value('microsoft') def set_microsoft(self, microsoft): """ The method to set the value to microsoft Parameters: microsoft (bool) : A bool representing the microsoft """ if microsoft is not None and not isinstance(microsoft, bool): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: microsoft EXPECTED TYPE: bool', None, None) self.add_key_value('microsoft', microsoft) def get_isonline(self): """ The method to get the isonline Returns: bool: A bool representing the isonline """ return self.get_key_value('Isonline') def set_isonline(self, isonline): """ The method to set the value to isonline Parameters: isonline (bool) : A bool representing the isonline """ if isonline is not None and not isinstance(isonline, bool): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: isonline EXPECTED TYPE: bool', None, None) self.add_key_value('Isonline', isonline) def get_street(self): """ The method to get the street Returns: string: A string representing the street """ return self.get_key_value('street') def set_street(self, street): """ The method to set the value to street Parameters: street (string) : A string representing the street """ if street is not None and not isinstance(street, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: street EXPECTED TYPE: str', None, None) self.add_key_value('street', street) def get_currency(self): """ The method to get the currency Returns: string: A string representing the currency """ return self.get_key_value('Currency') def set_currency(self, currency): """ The method to set the value to currency Parameters: currency (string) : A string representing the currency """ if currency is not None and not isinstance(currency, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: currency EXPECTED TYPE: str', None, None) self.add_key_value('Currency', currency) def get_alias(self): """ The method to get the alias Returns: string: A string representing the alias """ return self.get_key_value('alias') def set_alias(self, alias): """ The method to set the value to alias Parameters: alias (string) : A string representing the alias """ if alias is not None and not isinstance(alias, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: alias EXPECTED TYPE: str', None, None) self.add_key_value('alias', alias) def get_theme(self): """ The method to get the theme Returns: Theme: An instance of Theme """ return self.get_key_value('theme') def set_theme(self, theme): """ The method to set the value to theme Parameters: theme (Theme) : An instance of Theme """ try: from zcrmsdk.src.com.zoho.crm.api.users.theme import Theme except Exception: from .theme import Theme if theme is not None and not isinstance(theme, Theme): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: theme EXPECTED TYPE: Theme', None, None) self.add_key_value('theme', theme) def get_state(self): """ The method to get the state Returns: string: A string representing the state """ return self.get_key_value('state') def set_state(self, state): """ The method to set the value to state Parameters: state (string) : A string representing the state """ if state is not None and not isinstance(state, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: state EXPECTED TYPE: str', None, None) self.add_key_value('state', state) def get_fax(self): """ The method to get the fax Returns: string: A string representing the fax """ return self.get_key_value('fax') def set_fax(self, fax): """ The method to set the value to fax Parameters: fax (string) : A string representing the fax """ if fax is not None and not isinstance(fax, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: fax EXPECTED TYPE: str', None, None) self.add_key_value('fax', fax) def get_country_locale(self): """ The method to get the country_locale Returns: string: A string representing the country_locale """ return self.get_key_value('country_locale') def set_country_locale(self, country_locale): """ The method to set the value to country_locale Parameters: country_locale (string) : A string representing the country_locale """ if country_locale is not None and not isinstance(country_locale, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: country_locale EXPECTED TYPE: str', None, None) self.add_key_value('country_locale', country_locale) def get_sandboxdeveloper(self): """ The method to get the sandboxdeveloper Returns: bool: A bool representing the sandboxdeveloper """ return self.get_key_value('sandboxDeveloper') def set_sandboxdeveloper(self, sandboxdeveloper): """ The method to set the value to sandboxdeveloper Parameters: sandboxdeveloper (bool) : A bool representing the sandboxdeveloper """ if sandboxdeveloper is not None and not isinstance(sandboxdeveloper, bool): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: sandboxdeveloper EXPECTED TYPE: bool', None, None) self.add_key_value('sandboxDeveloper', sandboxdeveloper) def get_first_name(self): """ The method to get the first_name Returns: string: A string representing the first_name """ return self.get_key_value('first_name') def set_first_name(self, first_name): """ The method to set the value to first_name Parameters: first_name (string) : A string representing the first_name """ if first_name is not None and not isinstance(first_name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: first_name EXPECTED TYPE: str', None, None) self.add_key_value('first_name', first_name) def get_email(self): """ The method to get the email Returns: string: A string representing the email """ return self.get_key_value('email') def set_email(self, email): """ The method to set the value to email Parameters: email (string) : A string representing the email """ if email is not None and not isinstance(email, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: email EXPECTED TYPE: str', None, None) self.add_key_value('email', email) def get_reporting_to(self): """ The method to get the reporting_to Returns: User: An instance of User """ return self.get_key_value('Reporting_To') def set_reporting_to(self, reporting_to): """ The method to set the value to reporting_to Parameters: reporting_to (User) : An instance of User """ try: from zcrmsdk.src.com.zoho.crm.api.users.user import User except Exception: from .user import User if reporting_to is not None and not isinstance(reporting_to, User): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: reporting_to EXPECTED TYPE: User', None, None) self.add_key_value('Reporting_To', reporting_to) def get_decimal_separator(self): """ The method to get the decimal_separator Returns: string: A string representing the decimal_separator """ return self.get_key_value('decimal_separator') def set_decimal_separator(self, decimal_separator): """ The method to set the value to decimal_separator Parameters: decimal_separator (string) : A string representing the decimal_separator """ if decimal_separator is not None and not isinstance(decimal_separator, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: decimal_separator EXPECTED TYPE: str', None, None) self.add_key_value('decimal_separator', decimal_separator) def get_zip(self): """ The method to get the zip Returns: string: A string representing the zip """ return self.get_key_value('zip') def set_zip(self, zip): """ The method to set the value to zip Parameters: zip (string) : A string representing the zip """ if zip is not None and not isinstance(zip, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: zip EXPECTED TYPE: str', None, None) self.add_key_value('zip', zip) def get_website(self): """ The method to get the website Returns: string: A string representing the website """ return self.get_key_value('website') def set_website(self, website): """ The method to set the value to website Parameters: website (string) : A string representing the website """ if website is not None and not isinstance(website, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: website EXPECTED TYPE: str', None, None) self.add_key_value('website', website) def get_time_format(self): """ The method to get the time_format Returns: string: A string representing the time_format """ return self.get_key_value('time_format') def set_time_format(self, time_format): """ The method to set the value to time_format Parameters: time_format (string) : A string representing the time_format """ if time_format is not None and not isinstance(time_format, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: time_format EXPECTED TYPE: str', None, None) self.add_key_value('time_format', time_format) def get_offset(self): """ The method to get the offset Returns: int: An int representing the offset """ return self.get_key_value('offset') def set_offset(self, offset): """ The method to set the value to offset Parameters: offset (int) : An int representing the offset """ if offset is not None and not isinstance(offset, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: offset EXPECTED TYPE: int', None, None) self.add_key_value('offset', offset) def get_profile(self): """ The method to get the profile Returns: Profile: An instance of Profile """ return self.get_key_value('profile') def set_profile(self, profile): """ The method to set the value to profile Parameters: profile (Profile) : An instance of Profile """ try: from zcrmsdk.src.com.zoho.crm.api.profiles import Profile except Exception: from ..profiles import Profile if profile is not None and not isinstance(profile, Profile): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: profile EXPECTED TYPE: Profile', None, None) self.add_key_value('profile', profile) def get_mobile(self): """ The method to get the mobile Returns: string: A string representing the mobile """ return self.get_key_value('mobile') def set_mobile(self, mobile): """ The method to set the value to mobile Parameters: mobile (string) : A string representing the mobile """ if mobile is not None and not isinstance(mobile, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: mobile EXPECTED TYPE: str', None, None) self.add_key_value('mobile', mobile) def get_last_name(self): """ The method to get the last_name Returns: string: A string representing the last_name """ return self.get_key_value('last_name') def set_last_name(self, last_name): """ The method to set the value to last_name Parameters: last_name (string) : A string representing the last_name """ if last_name is not None and not isinstance(last_name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: last_name EXPECTED TYPE: str', None, None) self.add_key_value('last_name', last_name) def get_time_zone(self): """ The method to get the time_zone Returns: string: A string representing the time_zone """ return self.get_key_value('time_zone') def set_time_zone(self, time_zone): """ The method to set the value to time_zone Parameters: time_zone (string) : A string representing the time_zone """ if time_zone is not None and not isinstance(time_zone, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: time_zone EXPECTED TYPE: str', None, None) self.add_key_value('time_zone', time_zone) def get_zuid(self): """ The method to get the zuid Returns: string: A string representing the zuid """ return self.get_key_value('zuid') def set_zuid(self, zuid): """ The method to set the value to zuid Parameters: zuid (string) : A string representing the zuid """ if zuid is not None and not isinstance(zuid, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: zuid EXPECTED TYPE: str', None, None) self.add_key_value('zuid', zuid) def get_confirm(self): """ The method to get the confirm Returns: bool: A bool representing the confirm """ return self.get_key_value('confirm') def set_confirm(self, confirm): """ The method to set the value to confirm Parameters: confirm (bool) : A bool representing the confirm """ if confirm is not None and not isinstance(confirm, bool): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: confirm EXPECTED TYPE: bool', None, None) self.add_key_value('confirm', confirm) def get_full_name(self): """ The method to get the full_name Returns: string: A string representing the full_name """ return self.get_key_value('full_name') def set_full_name(self, full_name): """ The method to set the value to full_name Parameters: full_name (string) : A string representing the full_name """ if full_name is not None and not isinstance(full_name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: full_name EXPECTED TYPE: str', None, None) self.add_key_value('full_name', full_name) def get_territories(self): """ The method to get the territories Returns: list: An instance of list """ return self.get_key_value('territories') def set_territories(self, territories): """ The method to set the value to territories Parameters: territories (list) : An instance of list """ if territories is not None and not isinstance(territories, list): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: territories EXPECTED TYPE: list', None, None) self.add_key_value('territories', territories) def get_phone(self): """ The method to get the phone Returns: string: A string representing the phone """ return self.get_key_value('phone') def set_phone(self, phone): """ The method to set the value to phone Parameters: phone (string) : A string representing the phone """ if phone is not None and not isinstance(phone, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: phone EXPECTED TYPE: str', None, None) self.add_key_value('phone', phone) def get_dob(self): """ The method to get the dob Returns: string: A string representing the dob """ return self.get_key_value('dob') def set_dob(self, dob): """ The method to set the value to dob Parameters: dob (string) : A string representing the dob """ if dob is not None and not isinstance(dob, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: dob EXPECTED TYPE: str', None, None) self.add_key_value('dob', dob) def get_date_format(self): """ The method to get the date_format Returns: string: A string representing the date_format """ return self.get_key_value('date_format') def set_date_format(self, date_format): """ The method to set the value to date_format Parameters: date_format (string) : A string representing the date_format """ if date_format is not None and not isinstance(date_format, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: date_format EXPECTED TYPE: str', None, None) self.add_key_value('date_format', date_format) def get_status(self): """ The method to get the status Returns: string: A string representing the status """ return self.get_key_value('status') def set_status(self, status): """ The method to set the value to status Parameters: status (string) : A string representing the status """ if status is not None and not isinstance(status, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: status EXPECTED TYPE: str', None, None) self.add_key_value('status', status) def get_name(self): """ The method to get the name Returns: string: A string representing the name """ return self.get_key_value('name') def set_name(self, name): """ The method to set the value to name Parameters: name (string) : A string representing the name """ if name is not None and not isinstance(name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: name EXPECTED TYPE: str', None, None) self.add_key_value('name', name) def get_category(self): """ The method to get the category Returns: string: A string representing the category """ return self.get_key_value('category') def set_category(self, category): """ The method to set the value to category Parameters: category (string) : A string representing the category """ if category is not None and not isinstance(category, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: category EXPECTED TYPE: str', None, None) self.add_key_value('category', category)
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/users/user.py
user.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants except Exception: from ..exception import SDKException from ..util import Constants class Shift(object): def __init__(self): """Creates an instance of Shift""" self.__id = None self.__name = None self.__key_modified = dict() def get_id(self): """ The method to get the id Returns: int: An int representing the id """ return self.__id def set_id(self, id): """ The method to set the value to id Parameters: id (int) : An int representing the id """ if id is not None and not isinstance(id, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: int', None, None) self.__id = id self.__key_modified['id'] = 1 def get_name(self): """ The method to get the name Returns: string: A string representing the name """ return self.__name def set_name(self, name): """ The method to set the value to name Parameters: name (string) : A string representing the name """ if name is not None and not isinstance(name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: name EXPECTED TYPE: str', None, None) self.__name = name self.__key_modified['name'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/users/shift.py
shift.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Choice, Constants from zcrmsdk.src.com.zoho.crm.api.users.action_response import ActionResponse except Exception: from ..exception import SDKException from ..util import Choice, Constants from .action_response import ActionResponse class SuccessResponse(ActionResponse): def __init__(self): """Creates an instance of SuccessResponse""" super().__init__() self.__status = None self.__code = None self.__message = None self.__details = None self.__key_modified = dict() def get_status(self): """ The method to get the status Returns: Choice: An instance of Choice """ return self.__status def set_status(self, status): """ The method to set the value to status Parameters: status (Choice) : An instance of Choice """ if status is not None and not isinstance(status, Choice): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: status EXPECTED TYPE: Choice', None, None) self.__status = status self.__key_modified['status'] = 1 def get_code(self): """ The method to get the code Returns: Choice: An instance of Choice """ return self.__code def set_code(self, code): """ The method to set the value to code Parameters: code (Choice) : An instance of Choice """ if code is not None and not isinstance(code, Choice): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: code EXPECTED TYPE: Choice', None, None) self.__code = code self.__key_modified['code'] = 1 def get_message(self): """ The method to get the message Returns: Choice: An instance of Choice """ return self.__message def set_message(self, message): """ The method to set the value to message Parameters: message (Choice) : An instance of Choice """ if message is not None and not isinstance(message, Choice): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: message EXPECTED TYPE: Choice', None, None) self.__message = message self.__key_modified['message'] = 1 def get_details(self): """ The method to get the details Returns: dict: An instance of dict """ return self.__details def set_details(self, details): """ The method to set the value to details Parameters: details (dict) : An instance of dict """ if details is not None and not isinstance(details, dict): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: details EXPECTED TYPE: dict', None, None) self.__details = details self.__key_modified['details'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/users/success_response.py
success_response.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants except Exception: from ..exception import SDKException from ..util import Constants class TabTheme(object): def __init__(self): """Creates an instance of TabTheme""" self.__font_color = None self.__background = None self.__key_modified = dict() def get_font_color(self): """ The method to get the font_color Returns: string: A string representing the font_color """ return self.__font_color def set_font_color(self, font_color): """ The method to set the value to font_color Parameters: font_color (string) : A string representing the font_color """ if font_color is not None and not isinstance(font_color, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: font_color EXPECTED TYPE: str', None, None) self.__font_color = font_color self.__key_modified['font_color'] = 1 def get_background(self): """ The method to get the background Returns: string: A string representing the background """ return self.__background def set_background(self, background): """ The method to set the value to background Parameters: background (string) : A string representing the background """ if background is not None and not isinstance(background, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: background EXPECTED TYPE: str', None, None) self.__background = background self.__key_modified['background'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/users/tab_theme.py
tab_theme.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants except Exception: from ..exception import SDKException from ..util import Constants class CustomizeInfo(object): def __init__(self): """Creates an instance of CustomizeInfo""" self.__notes_desc = None self.__show_right_panel = None self.__bc_view = None self.__show_home = None self.__show_detail_view = None self.__unpin_recent_item = None self.__key_modified = dict() def get_notes_desc(self): """ The method to get the notes_desc Returns: bool: A bool representing the notes_desc """ return self.__notes_desc def set_notes_desc(self, notes_desc): """ The method to set the value to notes_desc Parameters: notes_desc (bool) : A bool representing the notes_desc """ if notes_desc is not None and not isinstance(notes_desc, bool): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: notes_desc EXPECTED TYPE: bool', None, None) self.__notes_desc = notes_desc self.__key_modified['notes_desc'] = 1 def get_show_right_panel(self): """ The method to get the show_right_panel Returns: string: A string representing the show_right_panel """ return self.__show_right_panel def set_show_right_panel(self, show_right_panel): """ The method to set the value to show_right_panel Parameters: show_right_panel (string) : A string representing the show_right_panel """ if show_right_panel is not None and not isinstance(show_right_panel, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: show_right_panel EXPECTED TYPE: str', None, None) self.__show_right_panel = show_right_panel self.__key_modified['show_right_panel'] = 1 def get_bc_view(self): """ The method to get the bc_view Returns: string: A string representing the bc_view """ return self.__bc_view def set_bc_view(self, bc_view): """ The method to set the value to bc_view Parameters: bc_view (string) : A string representing the bc_view """ if bc_view is not None and not isinstance(bc_view, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: bc_view EXPECTED TYPE: str', None, None) self.__bc_view = bc_view self.__key_modified['bc_view'] = 1 def get_show_home(self): """ The method to get the show_home Returns: bool: A bool representing the show_home """ return self.__show_home def set_show_home(self, show_home): """ The method to set the value to show_home Parameters: show_home (bool) : A bool representing the show_home """ if show_home is not None and not isinstance(show_home, bool): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: show_home EXPECTED TYPE: bool', None, None) self.__show_home = show_home self.__key_modified['show_home'] = 1 def get_show_detail_view(self): """ The method to get the show_detail_view Returns: bool: A bool representing the show_detail_view """ return self.__show_detail_view def set_show_detail_view(self, show_detail_view): """ The method to set the value to show_detail_view Parameters: show_detail_view (bool) : A bool representing the show_detail_view """ if show_detail_view is not None and not isinstance(show_detail_view, bool): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: show_detail_view EXPECTED TYPE: bool', None, None) self.__show_detail_view = show_detail_view self.__key_modified['show_detail_view'] = 1 def get_unpin_recent_item(self): """ The method to get the unpin_recent_item Returns: string: A string representing the unpin_recent_item """ return self.__unpin_recent_item def set_unpin_recent_item(self, unpin_recent_item): """ The method to set the value to unpin_recent_item Parameters: unpin_recent_item (string) : A string representing the unpin_recent_item """ if unpin_recent_item is not None and not isinstance(unpin_recent_item, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: unpin_recent_item EXPECTED TYPE: str', None, None) self.__unpin_recent_item = unpin_recent_item self.__key_modified['unpin_recent_item'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/users/customize_info.py
customize_info.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants from zcrmsdk.src.com.zoho.crm.api.custom_views.response_handler import ResponseHandler except Exception: from ..exception import SDKException from ..util import Constants from .response_handler import ResponseHandler class ResponseWrapper(ResponseHandler): def __init__(self): """Creates an instance of ResponseWrapper""" super().__init__() self.__custom_views = None self.__info = None self.__key_modified = dict() def get_custom_views(self): """ The method to get the custom_views Returns: list: An instance of list """ return self.__custom_views def set_custom_views(self, custom_views): """ The method to set the value to custom_views Parameters: custom_views (list) : An instance of list """ if custom_views is not None and not isinstance(custom_views, list): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: custom_views EXPECTED TYPE: list', None, None) self.__custom_views = custom_views self.__key_modified['custom_views'] = 1 def get_info(self): """ The method to get the info Returns: Info: An instance of Info """ return self.__info def set_info(self, info): """ The method to set the value to info Parameters: info (Info) : An instance of Info """ try: from zcrmsdk.src.com.zoho.crm.api.custom_views.info import Info except Exception: from .info import Info if info is not None and not isinstance(info, Info): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: info EXPECTED TYPE: Info', None, None) self.__info = info self.__key_modified['info'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/custom_views/response_wrapper.py
response_wrapper.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.parameter_map import ParameterMap from zcrmsdk.src.com.zoho.crm.api.util import APIResponse, CommonAPIHandler, Constants from zcrmsdk.src.com.zoho.crm.api.param import Param except Exception: from ..exception import SDKException from ..parameter_map import ParameterMap from ..util import APIResponse, CommonAPIHandler, Constants from ..param import Param class CustomViewsOperations(object): def __init__(self, module=None): """ Creates an instance of CustomViewsOperations with the given parameters Parameters: module (string) : A string representing the module """ if module is not None and not isinstance(module, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: module EXPECTED TYPE: str', None, None) self.__module = module def get_custom_views(self, param_instance=None): """ The method to get custom views Parameters: param_instance (ParameterMap) : An instance of ParameterMap Returns: APIResponse: An instance of APIResponse Raises: SDKException """ if param_instance is not None and not isinstance(param_instance, ParameterMap): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: param_instance EXPECTED TYPE: ParameterMap', None, None) handler_instance = CommonAPIHandler() api_path = '' api_path = api_path + '/crm/v2.1/settings/custom_views' handler_instance.set_api_path(api_path) handler_instance.set_http_method(Constants.REQUEST_METHOD_GET) handler_instance.set_category_method(Constants.REQUEST_CATEGORY_READ) handler_instance.add_param(Param('module', 'com.zoho.crm.api.CustomViews.GetCustomViewsParam'), self.__module) handler_instance.set_param(param_instance) try: from zcrmsdk.src.com.zoho.crm.api.custom_views.response_handler import ResponseHandler except Exception: from .response_handler import ResponseHandler return handler_instance.api_call(ResponseHandler.__module__, 'application/json') def get_custom_view(self, id): """ The method to get custom view Parameters: id (int) : An int representing the id Returns: APIResponse: An instance of APIResponse Raises: SDKException """ if not isinstance(id, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: int', None, None) handler_instance = CommonAPIHandler() api_path = '' api_path = api_path + '/crm/v2.1/settings/custom_views/' api_path = api_path + str(id) handler_instance.set_api_path(api_path) handler_instance.set_http_method(Constants.REQUEST_METHOD_GET) handler_instance.set_category_method(Constants.REQUEST_CATEGORY_READ) handler_instance.add_param(Param('module', 'com.zoho.crm.api.CustomViews.GetCustomViewParam'), self.__module) try: from zcrmsdk.src.com.zoho.crm.api.custom_views.response_handler import ResponseHandler except Exception: from .response_handler import ResponseHandler return handler_instance.api_call(ResponseHandler.__module__, 'application/json') class GetCustomViewsParam(object): page = Param('page', 'com.zoho.crm.api.CustomViews.GetCustomViewsParam') per_page = Param('per_page', 'com.zoho.crm.api.CustomViews.GetCustomViewsParam') class GetCustomViewParam(object): pass
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/custom_views/custom_views_operations.py
custom_views_operations.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants except Exception: from ..exception import SDKException from ..util import Constants class CustomView(object): def __init__(self): """Creates an instance of CustomView""" self.__id = None self.__name = None self.__system_name = None self.__display_value = None self.__created_time = None self.__access_type = None self.__category = None self.__sort_by = None self.__sort_order = None self.__favorite = None self.__default = None self.__system_defined = None self.__criteria = None self.__shared_to = None self.__fields = None self.__modified_time = None self.__modified_by = None self.__last_accessed_time = None self.__created_by = None self.__key_modified = dict() def get_id(self): """ The method to get the id Returns: int: An int representing the id """ return self.__id def set_id(self, id): """ The method to set the value to id Parameters: id (int) : An int representing the id """ if id is not None and not isinstance(id, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: int', None, None) self.__id = id self.__key_modified['id'] = 1 def get_name(self): """ The method to get the name Returns: string: A string representing the name """ return self.__name def set_name(self, name): """ The method to set the value to name Parameters: name (string) : A string representing the name """ if name is not None and not isinstance(name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: name EXPECTED TYPE: str', None, None) self.__name = name self.__key_modified['name'] = 1 def get_system_name(self): """ The method to get the system_name Returns: string: A string representing the system_name """ return self.__system_name def set_system_name(self, system_name): """ The method to set the value to system_name Parameters: system_name (string) : A string representing the system_name """ if system_name is not None and not isinstance(system_name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: system_name EXPECTED TYPE: str', None, None) self.__system_name = system_name self.__key_modified['system_name'] = 1 def get_display_value(self): """ The method to get the display_value Returns: string: A string representing the display_value """ return self.__display_value def set_display_value(self, display_value): """ The method to set the value to display_value Parameters: display_value (string) : A string representing the display_value """ if display_value is not None and not isinstance(display_value, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: display_value EXPECTED TYPE: str', None, None) self.__display_value = display_value self.__key_modified['display_value'] = 1 def get_created_time(self): """ The method to get the created_time Returns: datetime: An instance of datetime """ return self.__created_time def set_created_time(self, created_time): """ The method to set the value to created_time Parameters: created_time (datetime) : An instance of datetime """ from datetime import datetime if created_time is not None and not isinstance(created_time, datetime): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: created_time EXPECTED TYPE: datetime', None, None) self.__created_time = created_time self.__key_modified['created_time'] = 1 def get_access_type(self): """ The method to get the access_type Returns: string: A string representing the access_type """ return self.__access_type def set_access_type(self, access_type): """ The method to set the value to access_type Parameters: access_type (string) : A string representing the access_type """ if access_type is not None and not isinstance(access_type, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: access_type EXPECTED TYPE: str', None, None) self.__access_type = access_type self.__key_modified['access_type'] = 1 def get_category(self): """ The method to get the category Returns: string: A string representing the category """ return self.__category def set_category(self, category): """ The method to set the value to category Parameters: category (string) : A string representing the category """ if category is not None and not isinstance(category, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: category EXPECTED TYPE: str', None, None) self.__category = category self.__key_modified['category'] = 1 def get_sort_by(self): """ The method to get the sort_by Returns: string: A string representing the sort_by """ return self.__sort_by def set_sort_by(self, sort_by): """ The method to set the value to sort_by Parameters: sort_by (string) : A string representing the sort_by """ if sort_by is not None and not isinstance(sort_by, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: sort_by EXPECTED TYPE: str', None, None) self.__sort_by = sort_by self.__key_modified['sort_by'] = 1 def get_sort_order(self): """ The method to get the sort_order Returns: string: A string representing the sort_order """ return self.__sort_order def set_sort_order(self, sort_order): """ The method to set the value to sort_order Parameters: sort_order (string) : A string representing the sort_order """ if sort_order is not None and not isinstance(sort_order, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: sort_order EXPECTED TYPE: str', None, None) self.__sort_order = sort_order self.__key_modified['sort_order'] = 1 def get_favorite(self): """ The method to get the favorite Returns: int: An int representing the favorite """ return self.__favorite def set_favorite(self, favorite): """ The method to set the value to favorite Parameters: favorite (int) : An int representing the favorite """ if favorite is not None and not isinstance(favorite, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: favorite EXPECTED TYPE: int', None, None) self.__favorite = favorite self.__key_modified['favorite'] = 1 def get_default(self): """ The method to get the default Returns: bool: A bool representing the default """ return self.__default def set_default(self, default): """ The method to set the value to default Parameters: default (bool) : A bool representing the default """ if default is not None and not isinstance(default, bool): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: default EXPECTED TYPE: bool', None, None) self.__default = default self.__key_modified['default'] = 1 def get_system_defined(self): """ The method to get the system_defined Returns: bool: A bool representing the system_defined """ return self.__system_defined def set_system_defined(self, system_defined): """ The method to set the value to system_defined Parameters: system_defined (bool) : A bool representing the system_defined """ if system_defined is not None and not isinstance(system_defined, bool): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: system_defined EXPECTED TYPE: bool', None, None) self.__system_defined = system_defined self.__key_modified['system_defined'] = 1 def get_criteria(self): """ The method to get the criteria Returns: Criteria: An instance of Criteria """ return self.__criteria def set_criteria(self, criteria): """ The method to set the value to criteria Parameters: criteria (Criteria) : An instance of Criteria """ try: from zcrmsdk.src.com.zoho.crm.api.custom_views.criteria import Criteria except Exception: from .criteria import Criteria if criteria is not None and not isinstance(criteria, Criteria): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: criteria EXPECTED TYPE: Criteria', None, None) self.__criteria = criteria self.__key_modified['criteria'] = 1 def get_shared_to(self): """ The method to get the shared_to Returns: list: An instance of list """ return self.__shared_to def set_shared_to(self, shared_to): """ The method to set the value to shared_to Parameters: shared_to (list) : An instance of list """ if shared_to is not None and not isinstance(shared_to, list): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: shared_to EXPECTED TYPE: list', None, None) self.__shared_to = shared_to self.__key_modified['shared_to'] = 1 def get_fields(self): """ The method to get the fields Returns: list: An instance of list """ return self.__fields def set_fields(self, fields): """ The method to set the value to fields Parameters: fields (list) : An instance of list """ if fields is not None and not isinstance(fields, list): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: fields EXPECTED TYPE: list', None, None) self.__fields = fields self.__key_modified['fields'] = 1 def get_modified_time(self): """ The method to get the modified_time Returns: datetime: An instance of datetime """ return self.__modified_time def set_modified_time(self, modified_time): """ The method to set the value to modified_time Parameters: modified_time (datetime) : An instance of datetime """ from datetime import datetime if modified_time is not None and not isinstance(modified_time, datetime): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modified_time EXPECTED TYPE: datetime', None, None) self.__modified_time = modified_time self.__key_modified['modified_time'] = 1 def get_modified_by(self): """ The method to get the modified_by Returns: User: An instance of User """ return self.__modified_by def set_modified_by(self, modified_by): """ The method to set the value to modified_by Parameters: modified_by (User) : An instance of User """ try: from zcrmsdk.src.com.zoho.crm.api.users import User except Exception: from ..users import User if modified_by is not None and not isinstance(modified_by, User): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modified_by EXPECTED TYPE: User', None, None) self.__modified_by = modified_by self.__key_modified['modified_by'] = 1 def get_last_accessed_time(self): """ The method to get the last_accessed_time Returns: datetime: An instance of datetime """ return self.__last_accessed_time def set_last_accessed_time(self, last_accessed_time): """ The method to set the value to last_accessed_time Parameters: last_accessed_time (datetime) : An instance of datetime """ from datetime import datetime if last_accessed_time is not None and not isinstance(last_accessed_time, datetime): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: last_accessed_time EXPECTED TYPE: datetime', None, None) self.__last_accessed_time = last_accessed_time self.__key_modified['last_accessed_time'] = 1 def get_created_by(self): """ The method to get the created_by Returns: User: An instance of User """ return self.__created_by def set_created_by(self, created_by): """ The method to set the value to created_by Parameters: created_by (User) : An instance of User """ try: from zcrmsdk.src.com.zoho.crm.api.users import User except Exception: from ..users import User if created_by is not None and not isinstance(created_by, User): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: created_by EXPECTED TYPE: User', None, None) self.__created_by = created_by self.__key_modified['created_by'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/custom_views/custom_view.py
custom_view.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Choice, Constants from zcrmsdk.src.com.zoho.crm.api.custom_views.response_handler import ResponseHandler except Exception: from ..exception import SDKException from ..util import Choice, Constants from .response_handler import ResponseHandler class APIException(ResponseHandler): def __init__(self): """Creates an instance of APIException""" super().__init__() self.__status = None self.__code = None self.__message = None self.__details = None self.__key_modified = dict() def get_status(self): """ The method to get the status Returns: Choice: An instance of Choice """ return self.__status def set_status(self, status): """ The method to set the value to status Parameters: status (Choice) : An instance of Choice """ if status is not None and not isinstance(status, Choice): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: status EXPECTED TYPE: Choice', None, None) self.__status = status self.__key_modified['status'] = 1 def get_code(self): """ The method to get the code Returns: Choice: An instance of Choice """ return self.__code def set_code(self, code): """ The method to set the value to code Parameters: code (Choice) : An instance of Choice """ if code is not None and not isinstance(code, Choice): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: code EXPECTED TYPE: Choice', None, None) self.__code = code self.__key_modified['code'] = 1 def get_message(self): """ The method to get the message Returns: Choice: An instance of Choice """ return self.__message def set_message(self, message): """ The method to set the value to message Parameters: message (Choice) : An instance of Choice """ if message is not None and not isinstance(message, Choice): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: message EXPECTED TYPE: Choice', None, None) self.__message = message self.__key_modified['message'] = 1 def get_details(self): """ The method to get the details Returns: dict: An instance of dict """ return self.__details def set_details(self, details): """ The method to set the value to details Parameters: details (dict) : An instance of dict """ if details is not None and not isinstance(details, dict): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: details EXPECTED TYPE: dict', None, None) self.__details = details self.__key_modified['details'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/custom_views/api_exception.py
api_exception.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants except Exception: from ..exception import SDKException from ..util import Constants class Info(object): def __init__(self): """Creates an instance of Info""" self.__per_page = None self.__default = None self.__count = None self.__page = None self.__more_records = None self.__translation = None self.__key_modified = dict() def get_per_page(self): """ The method to get the per_page Returns: int: An int representing the per_page """ return self.__per_page def set_per_page(self, per_page): """ The method to set the value to per_page Parameters: per_page (int) : An int representing the per_page """ if per_page is not None and not isinstance(per_page, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: per_page EXPECTED TYPE: int', None, None) self.__per_page = per_page self.__key_modified['per_page'] = 1 def get_default(self): """ The method to get the default Returns: string: A string representing the default """ return self.__default def set_default(self, default): """ The method to set the value to default Parameters: default (string) : A string representing the default """ if default is not None and not isinstance(default, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: default EXPECTED TYPE: str', None, None) self.__default = default self.__key_modified['default'] = 1 def get_count(self): """ The method to get the count Returns: int: An int representing the count """ return self.__count def set_count(self, count): """ The method to set the value to count Parameters: count (int) : An int representing the count """ if count is not None and not isinstance(count, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: count EXPECTED TYPE: int', None, None) self.__count = count self.__key_modified['count'] = 1 def get_page(self): """ The method to get the page Returns: int: An int representing the page """ return self.__page def set_page(self, page): """ The method to set the value to page Parameters: page (int) : An int representing the page """ if page is not None and not isinstance(page, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: page EXPECTED TYPE: int', None, None) self.__page = page self.__key_modified['page'] = 1 def get_more_records(self): """ The method to get the more_records Returns: bool: A bool representing the more_records """ return self.__more_records def set_more_records(self, more_records): """ The method to set the value to more_records Parameters: more_records (bool) : A bool representing the more_records """ if more_records is not None and not isinstance(more_records, bool): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: more_records EXPECTED TYPE: bool', None, None) self.__more_records = more_records self.__key_modified['more_records'] = 1 def get_translation(self): """ The method to get the translation Returns: Translation: An instance of Translation """ return self.__translation def set_translation(self, translation): """ The method to set the value to translation Parameters: translation (Translation) : An instance of Translation """ try: from zcrmsdk.src.com.zoho.crm.api.custom_views.translation import Translation except Exception: from .translation import Translation if translation is not None and not isinstance(translation, Translation): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: translation EXPECTED TYPE: Translation', None, None) self.__translation = translation self.__key_modified['translation'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/custom_views/info.py
info.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Choice, Constants except Exception: from ..exception import SDKException from ..util import Choice, Constants class Criteria(object): def __init__(self): """Creates an instance of Criteria""" self.__comparator = None self.__field = None self.__value = None self.__group_operator = None self.__group = None self.__key_modified = dict() def get_comparator(self): """ The method to get the comparator Returns: Choice: An instance of Choice """ return self.__comparator def set_comparator(self, comparator): """ The method to set the value to comparator Parameters: comparator (Choice) : An instance of Choice """ if comparator is not None and not isinstance(comparator, Choice): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: comparator EXPECTED TYPE: Choice', None, None) self.__comparator = comparator self.__key_modified['comparator'] = 1 def get_field(self): """ The method to get the field Returns: Field: An instance of Field """ return self.__field def set_field(self, field): """ The method to set the value to field Parameters: field (Field) : An instance of Field """ try: from zcrmsdk.src.com.zoho.crm.api.fields import Field except Exception: from ..fields import Field if field is not None and not isinstance(field, Field): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: field EXPECTED TYPE: Field', None, None) self.__field = field self.__key_modified['field'] = 1 def get_value(self): """ The method to get the value Returns: Object: A Object representing the value """ return self.__value def set_value(self, value): """ The method to set the value to value Parameters: value (Object) : A Object representing the value """ self.__value = value self.__key_modified['value'] = 1 def get_group_operator(self): """ The method to get the group_operator Returns: Choice: An instance of Choice """ return self.__group_operator def set_group_operator(self, group_operator): """ The method to set the value to group_operator Parameters: group_operator (Choice) : An instance of Choice """ if group_operator is not None and not isinstance(group_operator, Choice): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: group_operator EXPECTED TYPE: Choice', None, None) self.__group_operator = group_operator self.__key_modified['group_operator'] = 1 def get_group(self): """ The method to get the group Returns: list: An instance of list """ return self.__group def set_group(self, group): """ The method to set the value to group Parameters: group (list) : An instance of list """ if group is not None and not isinstance(group, list): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: group EXPECTED TYPE: list', None, None) self.__group = group self.__key_modified['group'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/custom_views/criteria.py
criteria.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants except Exception: from ..exception import SDKException from ..util import Constants class Translation(object): def __init__(self): """Creates an instance of Translation""" self.__public_views = None self.__other_users_views = None self.__shared_with_me = None self.__created_by_me = None self.__key_modified = dict() def get_public_views(self): """ The method to get the public_views Returns: string: A string representing the public_views """ return self.__public_views def set_public_views(self, public_views): """ The method to set the value to public_views Parameters: public_views (string) : A string representing the public_views """ if public_views is not None and not isinstance(public_views, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: public_views EXPECTED TYPE: str', None, None) self.__public_views = public_views self.__key_modified['public_views'] = 1 def get_other_users_views(self): """ The method to get the other_users_views Returns: string: A string representing the other_users_views """ return self.__other_users_views def set_other_users_views(self, other_users_views): """ The method to set the value to other_users_views Parameters: other_users_views (string) : A string representing the other_users_views """ if other_users_views is not None and not isinstance(other_users_views, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: other_users_views EXPECTED TYPE: str', None, None) self.__other_users_views = other_users_views self.__key_modified['other_users_views'] = 1 def get_shared_with_me(self): """ The method to get the shared_with_me Returns: string: A string representing the shared_with_me """ return self.__shared_with_me def set_shared_with_me(self, shared_with_me): """ The method to set the value to shared_with_me Parameters: shared_with_me (string) : A string representing the shared_with_me """ if shared_with_me is not None and not isinstance(shared_with_me, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: shared_with_me EXPECTED TYPE: str', None, None) self.__shared_with_me = shared_with_me self.__key_modified['shared_with_me'] = 1 def get_created_by_me(self): """ The method to get the created_by_me Returns: string: A string representing the created_by_me """ return self.__created_by_me def set_created_by_me(self, created_by_me): """ The method to set the value to created_by_me Parameters: created_by_me (string) : A string representing the created_by_me """ if created_by_me is not None and not isinstance(created_by_me, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: created_by_me EXPECTED TYPE: str', None, None) self.__created_by_me = created_by_me self.__key_modified['created_by_me'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/custom_views/translation.py
translation.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants except Exception: from ..exception import SDKException from ..util import Constants class Range(object): def __init__(self): """Creates an instance of Range""" self.__from_1 = None self.__to = None self.__key_modified = dict() def get_from(self): """ The method to get the from Returns: int: An int representing the from_1 """ return self.__from_1 def set_from(self, from_1): """ The method to set the value to from Parameters: from_1 (int) : An int representing the from_1 """ if from_1 is not None and not isinstance(from_1, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: from_1 EXPECTED TYPE: int', None, None) self.__from_1 = from_1 self.__key_modified['from'] = 1 def get_to(self): """ The method to get the to Returns: int: An int representing the to """ return self.__to def set_to(self, to): """ The method to set the value to to Parameters: to (int) : An int representing the to """ if to is not None and not isinstance(to, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: to EXPECTED TYPE: int', None, None) self.__to = to self.__key_modified['to'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/custom_views/range.py
range.py
try: from zcrmsdk.src.com.zoho.crm.api.exception import SDKException from zcrmsdk.src.com.zoho.crm.api.util import Constants except Exception: from ..exception import SDKException from ..util import Constants class SharedTo(object): def __init__(self): """Creates an instance of SharedTo""" self.__id = None self.__name = None self.__type = None self.__subordinates = None self.__key_modified = dict() def get_id(self): """ The method to get the id Returns: int: An int representing the id """ return self.__id def set_id(self, id): """ The method to set the value to id Parameters: id (int) : An int representing the id """ if id is not None and not isinstance(id, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: id EXPECTED TYPE: int', None, None) self.__id = id self.__key_modified['id'] = 1 def get_name(self): """ The method to get the name Returns: string: A string representing the name """ return self.__name def set_name(self, name): """ The method to set the value to name Parameters: name (string) : A string representing the name """ if name is not None and not isinstance(name, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: name EXPECTED TYPE: str', None, None) self.__name = name self.__key_modified['name'] = 1 def get_type(self): """ The method to get the type Returns: string: A string representing the type """ return self.__type def set_type(self, type): """ The method to set the value to type Parameters: type (string) : A string representing the type """ if type is not None and not isinstance(type, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: type EXPECTED TYPE: str', None, None) self.__type = type self.__key_modified['type'] = 1 def get_subordinates(self): """ The method to get the subordinates Returns: bool: A bool representing the subordinates """ return self.__subordinates def set_subordinates(self, subordinates): """ The method to set the value to subordinates Parameters: subordinates (bool) : A bool representing the subordinates """ if subordinates is not None and not isinstance(subordinates, bool): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: subordinates EXPECTED TYPE: bool', None, None) self.__subordinates = subordinates self.__key_modified['subordinates'] = 1 def is_key_modified(self, key): """ The method to check if the user has modified the given key Parameters: key (string) : A string representing the key Returns: int: An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if key in self.__key_modified: return self.__key_modified.get(key) return None def set_key_modified(self, key, modification): """ The method to mark the given key as modified Parameters: key (string) : A string representing the key modification (int) : An int representing the modification """ if key is not None and not isinstance(key, str): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: key EXPECTED TYPE: str', None, None) if modification is not None and not isinstance(modification, int): raise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: modification EXPECTED TYPE: int', None, None) self.__key_modified[key] = modification
zohocrmsdk2-1
/zohocrmsdk2_1-2.0.0.tar.gz/zohocrmsdk2_1-2.0.0/zcrmsdk/src/com/zoho/crm/api/custom_views/shared_to.py
shared_to.py