示例#1
0
 /// <summary>
 /// Method to get download the result of the bulk read job and get CSV file as ZCRMRecord instance.
 /// </summary>
 /// <param name="filePath">file path to store the Downloaded file.</param>
 /// <returns>BulkResponse - BulkResponse instance of the BulkResponse class which holds the response.</returns>
 public BulkResponse DownloadANDGetRecords(string filePath)
 {
     if (filePath == null)
     {
         throw new ZCRMException("File Path must not be null for download and get records operation.");
     }
     return(BulkAPIHandler.GetInstance(this).ProcessZip(filePath, true, null, APIConstants.READ, null, false));
 }
示例#2
0
 /// <summary>
 /// Method to get CSV file as failed ZCRMRecord instance.
 /// </summary>
 /// <param name="filePath">file path of the downloaded file.</param>
 /// <param name="fileName">file name of the downloaded file.</param>
 /// <returns>BulkResponse - BulkResponse instance of the BulkResponse class which holds the response.</returns>
 public BulkResponse GetFailedRecords(string filePath, string fileName)
 {
     if (fileName == null)
     {
         throw new ZCRMException("File Name must not be null for get failed records operation.");
     }
     if (filePath == null)
     {
         throw new ZCRMException("File Path must not be null for get failed records operation.");
     }
     return(BulkAPIHandler.GetInstance(this).ProcessZip(filePath, false, fileName, APIConstants.WRITE, null, true));
 }
示例#3
0
 /// <summary>
 /// Method to get download the result of the bulk write job and get CSV file as failed ZCRMRecord instance.
 /// </summary>
 /// <param name="filePath">file path to store the downloaded file.</param>
 /// <param name="downloadFileURL">The download URL from which you can download the result(CSV file) of the bulk write job.</param>
 /// <returns>BulkResponse - BulkResponse instance of the BulkResponse class which holds the response.</returns>
 public BulkResponse DownloadANDGetFailedRecords(string filePath, string downloadFileURL)
 {
     if (downloadFileURL == null)
     {
         throw new ZCRMException("Download File URL must not be null for download and get failed records operation.");
     }
     if (filePath == null)
     {
         throw new ZCRMException("File Path must not be null for download and get failed records operation.");
     }
     return(BulkAPIHandler.GetInstance(this).ProcessZip(filePath, true, null, APIConstants.WRITE, downloadFileURL, true));
 }