Exemple #1
0
class GetRelatedRecordsHeader(object):
    if_modified_since = Header(
        'If-Modified-Since',
        'com.zoho.crm.api.RelatedRecords.GetRelatedRecordsHeader')
    x_external = Header(
        'X-EXTERNAL',
        'com.zoho.crm.api.RelatedRecords.GetRelatedRecordsHeader')
Exemple #2
0
    def get_profile(self, id):
        """
		The method to get profile

		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/settings/profiles/'
        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_header(
            Header('If-Modified-Since',
                   'com.zoho.crm.api.Profiles.GetProfileHeader'),
            self.__if_modified_since)
        try:
            from zcrmsdk.src.com.zoho.crm.api.profiles.response_handler import ResponseHandler
        except Exception:
            from .response_handler import ResponseHandler
        return handler_instance.api_call(ResponseHandler.__module__,
                                         'application/json')
Exemple #3
0
    def get_profiles(self):
        """
		The method to get profiles

		Returns:
			APIResponse: An instance of APIResponse

		Raises:
			SDKException
		"""

        handler_instance = CommonAPIHandler()
        api_path = ''
        api_path = api_path + '/crm/v2/settings/profiles'
        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_header(
            Header('If-Modified-Since',
                   'com.zoho.crm.api.Profiles.GetProfilesHeader'),
            self.__if_modified_since)
        try:
            from zcrmsdk.src.com.zoho.crm.api.profiles.response_handler import ResponseHandler
        except Exception:
            from .response_handler import ResponseHandler
        return handler_instance.api_call(ResponseHandler.__module__,
                                         'application/json')
Exemple #4
0
class DelinkRecordHeader(object):
    x_external = Header('X-EXTERNAL',
                        'com.zoho.crm.api.RelatedRecords.DelinkRecordHeader')
Exemple #5
0
class GetRelatedRecordHeader(object):
    if_modified_since = Header(
        'If-Modified-Since',
        'com.zoho.crm.api.RelatedRecords.GetRelatedRecordHeader')
Exemple #6
0
class UploadFileHeader(object):
	feature = Header('feature', 'com.zoho.crm.api.BulkWrite.UploadFileHeader')
	x_crm_org = Header('X-CRM-ORG', 'com.zoho.crm.api.BulkWrite.UploadFileHeader')
Exemple #7
0
class GetUserHeader(object):
    if_modified_since = Header('If-Modified-Since',
                               'com.zoho.crm.api.Users.GetUserHeader')
Exemple #8
0
class SearchRecordsHeader(object):
	x_external = Header('X-EXTERNAL', 'com.zoho.crm.api.Record.SearchRecordsHeader')
Exemple #9
0
class UpsertRecordsHeader(object):
	x_external = Header('X-EXTERNAL', 'com.zoho.crm.api.Record.UpsertRecordsHeader')
Exemple #10
0
class DeleteRecordsHeader(object):
	x_external = Header('X-EXTERNAL', 'com.zoho.crm.api.Record.DeleteRecordsHeader')
Exemple #11
0
class GetNoteHeader(object):
    if_modified_since = Header('If-Modified-Since',
                               'com.zoho.crm.api.Notes.GetNoteHeader')
Exemple #12
0
class GetModulesHeader(object):
    if_modified_since = Header('If-Modified-Since',
                               'com.zoho.crm.api.Modules.GetModulesHeader')