public Dashboard SSRSReportDetails(Dashboard board, User user)
        {
            string url = WebConfigurationManager.AppSettings["ReportingServerURL"];

            board.ReportModelList = new List <ReportModel>();
            //Get KPIs
            ReportsApi pwBi = new ReportsApi(IO.Swagger.Client.Configuration.DefaultApiClient);

            var power = pwBi.GetReportsString(0, 0, "", "", "", "", user.Username, user.Password, url);

            JObject jObject = JObject.Parse(power);
            int     count   = 0;

            if (((Newtonsoft.Json.Linq.JContainer)jObject.Last.Last).Count > 0)
            {
                foreach (var item in ((Newtonsoft.Json.Linq.JContainer)jObject.Last.Last).ToList())
                {
                    if (item.ToString().Substring(item.ToString().IndexOf("Path") + 9).StartsWith("Hoxworth"))
                    {
                        count++;
                        ReportModel model      = new ReportModel();
                        var         startIndex = item.ToString().IndexOf("Name");
                        startIndex = startIndex + 8;
                        var endINdex = item.ToString().IndexOf("Description");
                        endINdex   = endINdex - 7;
                        model.Name = item.ToString().Substring(startIndex, (endINdex - startIndex));
                        board.ReportModelList.Add(model);
                    }
                }
            }
            board.ReportCount = count;
            return(board);
        }
        public static ReportingV3ReportsGet200Response Run()
        {
            string organizationId     = null;
            var    startTime          = DateTime.ParseExact("2020-04-01T00:00:00Z", "yyyy-MM-ddTHH:mm:ssZ", CultureInfo.InvariantCulture);
            var    endTime            = DateTime.ParseExact("2020-04-03T23:59:59Z", "yyyy-MM-ddTHH:mm:ssZ", CultureInfo.InvariantCulture);
            string timeQueryType      = "executedTime";
            string reportMimeType     = "application/xml";
            string reportFrequency    = null;
            string reportName         = null;
            int?   reportDefinitionId = (int?)null;
            string reportStatus       = null;

            try
            {
                var configDictionary = new Configuration().GetConfiguration();
                var clientConfig     = new CyberSource.Client.Configuration(merchConfigDictObj: configDictionary);

                var apiInstance = new ReportsApi(clientConfig);
                ReportingV3ReportsGet200Response result = apiInstance.SearchReports(startTime, endTime, timeQueryType, organizationId, reportMimeType, reportFrequency, reportName, reportDefinitionId, reportStatus);
                Console.WriteLine(result);
                return(result);
            }
            catch (Exception e)
            {
                Console.WriteLine("Exception on calling the API : " + e.Message);
                return(null);
            }
        }
        public static void Run()
        {
            string reportDefinitionName = "TransactionRequestClass";

            List <string> reportFields = new List <string>();

            reportFields.Add("Request.RequestID");
            reportFields.Add("Request.TransactionDate");
            reportFields.Add("Request.MerchantID");
            string reportMimeType  = "application/xml";
            string reportName      = "testrest_v2";
            string timezone        = "GMT";
            var    reportStartTime = DateTime.Parse("2021-03-01T17:30:00.000+05:30");
            var    reportEndTime   = DateTime.Parse("2021-03-02T17:30:00.000+05:30");
            bool   reportPreferencesSignedAmounts                 = true;
            string reportPreferencesFieldNameConvention           = "SOAPI";
            Reportingv3reportsReportPreferences reportPreferences = new Reportingv3reportsReportPreferences(
                SignedAmounts: reportPreferencesSignedAmounts,
                FieldNameConvention: reportPreferencesFieldNameConvention
                );

            var requestObj = new CreateAdhocReportRequest(
                ReportDefinitionName: reportDefinitionName,
                ReportFields: reportFields,
                ReportMimeType: reportMimeType,
                ReportName: reportName,
                Timezone: timezone,
                ReportStartTime: reportStartTime,
                ReportEndTime: reportEndTime,
                ReportPreferences: reportPreferences
                );

            string organizationId = "testrest";

            try
            {
                var configDictionary = new Configuration().GetConfiguration();
                var clientConfig     = new CyberSource.Client.Configuration(merchConfigDictObj: configDictionary);

                var apiInstance = new ReportsApi(clientConfig);
                apiInstance.CreateReport(requestObj, organizationId);
            }
            catch (Exception e)
            {
                Console.WriteLine("Exception on calling the API : " + e.Message);
            }
        }
        public static void Run()
        {
            const string reportId       = "79642c43-2368-0cd5-e053-a2588e0a7b3c";
            const string organizationId = "testrest";

            try
            {
                var configDictionary = new Configuration().GetConfiguration();
                var clientConfig     = new CyberSource.Client.Configuration(merchConfigDictObj: configDictionary);
                var apiInstance      = new ReportsApi(clientConfig);

                var result = apiInstance.GetReportByReportId(reportId, organizationId);
                Console.WriteLine(result);
            }
            catch (Exception e)
            {
                Console.WriteLine("Exception on calling the API: " + e.Message);
            }
        }
        public static void Run()
        {
            try
            {
                var startTime      = DateTime.ParseExact("2018-10-01T00:00:00Z", "yyyy-MM-ddTHH:mm:ssZ", CultureInfo.InvariantCulture);
                var endTime        = DateTime.ParseExact("2018-10-30T23:59:59Z", "yyyy-MM-ddTHH:mm:ssZ", CultureInfo.InvariantCulture);
                var timeQueryType  = "executedTime";
                var organizationId = "testrest";

                var configDictionary = new Configuration().GetConfiguration();
                var clientConfig     = new CyberSource.Client.Configuration(merchConfigDictObj: configDictionary);
                var apiInstance      = new ReportsApi(clientConfig);

                var result = apiInstance.SearchReports(startTime, endTime, timeQueryType, organizationId);
            }
            catch (Exception e)
            {
                Console.WriteLine("Exception on calling the API: " + e.Message);
            }
        }
示例#6
0
        public static void Run()
        {
            try
            {
                var requestObj = new RequestBody1
                {
                    ReportDefinitionName = "TransactionRequestClass",
                    ReportFields         = new List <string>()
                    {
                        "Request.RequestID",
                        "Request.TransactionDate",
                        "Request.MerchantID"
                    },
                    ReportMimeType  = RequestBody1.ReportMimeTypeEnum.ApplicationXml,
                    ReportName      = "testrest_vter9",
                    Timezone        = "GMT",
                    ReportStartTime = DateTime.ParseExact("2018-09-01T12:00:00Z", "yyyy-MM-ddTHH:mm:ssZ", CultureInfo.InvariantCulture),
                    ReportEndTime   = DateTime.ParseExact("2018-09-02T12:00:00Z", "yyyy-MM-ddTHH:mm:ssZ", CultureInfo.InvariantCulture)
                };

                var reportPreferencesObj = new ReportingV3ReportSubscriptionsGet200ResponseReportPreferences()
                {
                    SignedAmounts       = true,
                    FieldNameConvention = ReportingV3ReportSubscriptionsGet200ResponseReportPreferences.FieldNameConventionEnum.SOAPI
                };

                requestObj.ReportPreferences = reportPreferencesObj;

                var configDictionary = new Configuration().GetConfiguration();
                var clientConfig     = new CyberSource.Client.Configuration(merchConfigDictObj: configDictionary);
                var apiInstance      = new ReportsApi(clientConfig);

                var result = apiInstance.CreateReportWithHttpInfo(requestObj);
                Console.WriteLine(result);
            }
            catch (Exception e)
            {
                Console.WriteLine("Exception on calling the API: " + e.Message);
            }
        }
示例#7
0
        public static void Run()
        {
            try
            {
                var requestObj = new RequestBody
                {
                    ReportDefinitionName = "TransactionRequestClass",
                    ReportFields         = new List <string>()
                    {
                        "Request.RequestID",
                        "Request.TransactionDate",
                        "Request.MerchantID"
                    },
                    ReportMimeType  = "application/xml",
                    ReportName      = Utilities.RandomString(17),
                    Timezone        = "GMT",
                    ReportStartTime = DateTime.ParseExact("2018-09-01T12:00:00Z", "yyyy-MM-ddTHH:mm:ssZ", CultureInfo.InvariantCulture),
                    ReportEndTime   = DateTime.ParseExact("2018-09-02T12:00:00Z", "yyyy-MM-ddTHH:mm:ssZ", CultureInfo.InvariantCulture)
                };

                var reportPreferencesObj = new Reportingv3reportsReportPreferences()
                {
                    SignedAmounts       = true,
                    FieldNameConvention = "SOAPI"
                };

                requestObj.ReportPreferences = reportPreferencesObj;

                var configDictionary = new Configuration().GetConfiguration();
                var clientConfig     = new CyberSource.Client.Configuration(merchConfigDictObj: configDictionary);
                var apiInstance      = new ReportsApi(clientConfig);

                apiInstance.CreateReport(requestObj);
            }
            catch (Exception e)
            {
                Console.WriteLine("Exception on calling the API: " + e.Message);
            }
        }
示例#8
0
 public void Init()
 {
     instance = new ReportsApi();
 }
 public void Init()
 {
     _instance = new ReportsApi(NprintingApiClient);
 }