public static PullResponse <T> pullResponse(ReadEntryListResponse res, string methodName, bool deleted, string lastSyncDate)
        {
            PullResponse <T> response = new PullResponse <T>();

            var listObjectConverted = SuiteWrapper.GetListObjectConverted <T>(res);

            response.data = listObjectConverted;
            if (int.Parse(res.TotalCount) == res.NextOffset || int.Parse(res.TotalCount) < res.NextOffset)
            {
                response.IsDataAvailable = false;
            }
            else
            {
                response.IsDataAvailable = true;
            }

            if (!response.IsDataAvailable)
            {
                response.NextDataURL = null;
            }
            else
            {
                response.NextDataURL = SuiteWrapper.nextURL + "api/SyncMasters/PullMasterData?methodName=" + methodName + "&lastSyncDate=" + lastSyncDate + "&nextOffSet=" + res.NextOffset + "&deleted=" + deleted + "";
            }

            return(response);
        }
        public static PullResponseWithoutPagination <T> pullResponse(ReadEntryListResponse res)
        {
            PullResponseWithoutPagination <T> response = new PullResponseWithoutPagination <T>();

            var listObjectConverted = SuiteWrapper.GetListObjectConverted <T>(res);

            response.data = listObjectConverted;

            return(response);
        }
Exemple #3
0
        public static List <T> GetListObjectConverted <T>(ReadEntryListResponse response)
        {
            var strList = Convert.ToString(response.EntityList);

            return(ToObjects <T>(strList));
        }