/// <summary>
        /// returns the number of feeds matching all of the specified criteria
        ///
        /// </summary>
        /// <param name="service">Instance of MarketplaceWebService service</param>
        /// <param name="request">GetFeedSubmissionCountRequest request</param>
        public static void InvokeCancelReportRequests(MarketplaceWebService service, CancelReportRequestsRequest request)
        {
            try
            {
                CancelReportRequestsResponse response = service.CancelReportRequests(request);


                Console.WriteLine("Service Response");
                Console.WriteLine("=============================================================================");
                Console.WriteLine();

                Console.WriteLine("        CancelReportRequestsResponse");

                if (response.IsSetCancelReportRequestsResult())
                {
                    Console.WriteLine("            CancelReportRequestsResult");
                    CancelReportRequestsResult cancelReportRequestsResult = response.CancelReportRequestsResult;
                    List <ReportRequestInfo>   reportRequestInfoList      = cancelReportRequestsResult.ReportRequestInfo;

                    foreach (ReportRequestInfo reportRequestInfo in reportRequestInfoList)
                    {
                        Console.WriteLine("                  ReportRequestInfo");

                        if (reportRequestInfo.IsSetReportProcessingStatus())
                        {
                            Console.WriteLine("               ReportProcessingStatus");
                            Console.WriteLine("                                  {0}", reportRequestInfo.ReportProcessingStatus);
                        }
                        if (reportRequestInfo.IsSetReportRequestId())
                        {
                            Console.WriteLine("                      ReportRequestId");
                            Console.WriteLine("                                  {0}", reportRequestInfo.ReportRequestId);
                        }
                        if (reportRequestInfo.IsSetReportType())
                        {
                            Console.WriteLine("                           ReportType");
                            Console.WriteLine("                                  {0}", reportRequestInfo.ReportType);
                        }
                        if (reportRequestInfo.IsSetStartDate())
                        {
                            Console.WriteLine("                            StartDate");
                            Console.WriteLine("                                  {0}", reportRequestInfo.StartDate);
                        }
                        if (reportRequestInfo.IsSetEndDate())
                        {
                            Console.WriteLine("                              EndDate");
                            Console.WriteLine("                                  {0}", reportRequestInfo.EndDate);
                        }
                        if (reportRequestInfo.IsSetSubmittedDate())
                        {
                            Console.WriteLine("                        SubmittedDate");
                            Console.WriteLine("                                  {0}", reportRequestInfo.SubmittedDate);
                        }
                    }
                }
                if (response.IsSetResponseMetadata())
                {
                    Console.WriteLine("            ResponseMetadata");
                    ResponseMetadata responseMetadata = response.ResponseMetadata;
                    if (responseMetadata.IsSetRequestId())
                    {
                        Console.WriteLine("                RequestId");
                        Console.WriteLine("                    {0}", responseMetadata.RequestId);
                    }
                }

                Console.WriteLine("            ResponseHeaderMetadata");
                Console.WriteLine("                RequestId");
                Console.WriteLine("                    " + response.ResponseHeaderMetadata.RequestId);
                Console.WriteLine("                ResponseContext");
                Console.WriteLine("                    " + response.ResponseHeaderMetadata.ResponseContext);
                Console.WriteLine("                Timestamp");
                Console.WriteLine("                    " + response.ResponseHeaderMetadata.Timestamp);
                Console.WriteLine();
            }
            catch (MarketplaceWebServiceException ex)
            {
                Console.WriteLine("Caught Exception: " + ex.Message);
                Console.WriteLine("Response Status Code: " + ex.StatusCode);
                Console.WriteLine("Error Code: " + ex.ErrorCode);
                Console.WriteLine("Error Type: " + ex.ErrorType);
                Console.WriteLine("Request ID: " + ex.RequestId);
                Console.WriteLine("XML: " + ex.XML);
                Console.WriteLine("ResponseHeaderMetadata: " + ex.ResponseHeaderMetadata);
            }
        }
 /// <summary>
 /// Cancel Report Requests
 /// </summary>
 /// <param name="request">Cancel Report Requests  request</param>
 /// <returns>Cancel Report Requests  Response from the service</returns>
 /// <remarks>
 /// cancels report requests that have not yet started processing,
 /// by default all those within the last 90 days
 ///
 /// </remarks>
 public CancelReportRequestsResponse CancelReportRequests(CancelReportRequestsRequest request)
 {
     return(Invoke <CancelReportRequestsResponse>("CancelReportRequestsResponse.xml"));
 }
Exemplo n.º 3
0
 /// <summary>
 /// Cancel Report Requests
 /// </summary>
 /// <param name="request">Cancel Report Requests  request</param>
 /// <returns>Cancel Report Requests  Response from the service</returns>
 /// <remarks>
 /// cancels report requests that have not yet started processing,
 /// by default all those within the last 90 days
 ///
 /// </remarks>
 public async Task <CancelReportRequestsResponse> CancelReportRequests(CancelReportRequestsRequest request)
 {
     return(await Invoke <CancelReportRequestsResponse>("CancelReportRequestsResponse.xml"));
 }