/// <summary> /// Creates, updates, or deletes a report schedule /// for a given report type, such as order reports in particular. /// /// </summary> /// <param name="service">Instance of MarketplaceWebService service</param> /// <param name="request">ManageReportScheduleRequest request</param> public static void InvokeManageReportSchedule(MarketplaceWebService service, ManageReportScheduleRequest request) { try { ManageReportScheduleResponse response = service.ManageReportSchedule(request); Console.WriteLine("Service Response"); Console.WriteLine("============================================================================="); Console.WriteLine(); Console.WriteLine(" ManageReportScheduleResponse"); if (response.IsSetManageReportScheduleResult()) { Console.WriteLine(" ManageReportScheduleResult"); ManageReportScheduleResult manageReportScheduleResult = response.ManageReportScheduleResult; if (manageReportScheduleResult.IsSetCount()) { Console.WriteLine(" Count"); Console.WriteLine(" {0}", manageReportScheduleResult.Count); } List <ReportSchedule> reportScheduleList = manageReportScheduleResult.ReportSchedule; foreach (ReportSchedule reportSchedule in reportScheduleList) { Console.WriteLine(" ReportSchedule"); if (reportSchedule.IsSetReportType()) { Console.WriteLine(" ReportType"); Console.WriteLine(" {0}", reportSchedule.ReportType); } if (reportSchedule.IsSetSchedule()) { Console.WriteLine(" Schedule"); Console.WriteLine(" {0}", reportSchedule.Schedule); } if (reportSchedule.IsSetScheduledDate()) { Console.WriteLine(" ScheduledDate"); Console.WriteLine(" {0}", reportSchedule.ScheduledDate); } } } 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); } 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> /// Manage Report Schedule /// </summary> /// <param name="request">Manage Report Schedule request</param> /// <returns>Manage Report Schedule Response from the service</returns> /// <remarks> /// Creates, updates, or deletes a report schedule /// for a given report type, such as order reports in particular. /// /// </remarks> public ManageReportScheduleResponse ManageReportSchedule(ManageReportScheduleRequest request) { return(Invoke <ManageReportScheduleResponse>("ManageReportScheduleResponse.xml")); }
/// <summary> /// Manage Report Schedule /// </summary> /// <param name="request">Manage Report Schedule request</param> /// <returns>Manage Report Schedule Response from the service</returns> /// <remarks> /// Creates, updates, or deletes a report schedule /// for a given report type, such as order reports in particular. /// /// </remarks> public async Task <ManageReportScheduleResponse> ManageReportSchedule(ManageReportScheduleRequest request) { return(await Invoke <ManageReportScheduleResponse>("ManageReportScheduleResponse.xml")); }