/// <summary> /// Returns the information required for retrieving a report document's /// contents. This includes a presigned URL for the report document as well as /// the information required to decrypt the document's contents. /// /// **Usage Plan:** /// /// | Rate (requests per second) | Burst | /// | ---- | ---- | /// | 0.0167 | 15 | /// /// For more information, see "Usage Plans and Rate Limits" in the Selling /// Partner API documentation. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='reportDocumentId'> /// The identifier for the report document. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <GetReportDocumentResponse> GetReportDocumentAsync(this IReportsClient operations, string reportDocumentId, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetReportDocumentWithHttpMessagesAsync(reportDocumentId, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Creates a report. /// /// **Usage Plan:** /// /// | Rate (requests per second) | Burst | /// | ---- | ---- | /// | 0.0167 | 15 | /// /// For more information, see "Usage Plans and Rate Limits" in the Selling /// Partner API documentation. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='body'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <CreateReportResponse> CreateReportAsync(this IReportsClient operations, CreateReportSpecification body, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateReportWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Cancels the report schedule that you specify. /// /// **Usage Plan:** /// /// | Rate (requests per second) | Burst | /// | ---- | ---- | /// | 0.0222 | 10 | /// /// For more information, see "Usage Plans and Rate Limits" in the Selling /// Partner API documentation. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='reportScheduleId'> /// The identifier for the report schedule. This identifier is unique only in /// combination with a seller ID. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ErrorList> CancelReportScheduleAsync(this IReportsClient operations, string reportScheduleId, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CancelReportScheduleWithHttpMessagesAsync(reportScheduleId, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Returns report details for the reports that match the filters that you /// specify. /// /// **Usage Plan:** /// /// | Rate (requests per second) | Burst | /// | ---- | ---- | /// | 0.0222 | 10 | /// /// For more information, see "Usage Plans and Rate Limits" in the Selling /// Partner API documentation. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='reportTypes'> /// A list of report types used to filter reports. When reportTypes is /// provided, the other filter parameters (processingStatuses, marketplaceIds, /// createdSince, createdUntil) and pageSize may also be provided. Either /// reportTypes or nextToken is required. /// </param> /// <param name='processingStatuses'> /// A list of processing statuses used to filter reports. /// </param> /// <param name='marketplaceIds'> /// A list of marketplace identifiers used to filter reports. The reports /// returned will match at least one of the marketplaces that you specify. /// </param> /// <param name='pageSize'> /// The maximum number of reports to return in a single call. /// </param> /// <param name='createdSince'> /// The earliest report creation date and time for reports to include in the /// response, in ISO 8601 date time format. The default is 90 days ago. Reports /// are retained for a maximum of 90 days. /// </param> /// <param name='createdUntil'> /// The latest report creation date and time for reports to include in the /// response, in ISO 8601 date time format. The default is now. /// </param> /// <param name='nextToken'> /// A string token returned in the response to your previous request. nextToken /// is returned when the number of results exceeds the specified pageSize /// value. To get the next page of results, call the getReports operation and /// include this token as the only parameter. Specifying nextToken with any /// other parameters will cause the request to fail. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <GetReportsResponse> GetReportsAsync(this IReportsClient operations, IList <string> reportTypes = default(IList <string>), IList <string> processingStatuses = default(IList <string>), IList <string> marketplaceIds = default(IList <string>), int?pageSize = 10, System.DateTime?createdSince = default(System.DateTime?), System.DateTime?createdUntil = default(System.DateTime?), string nextToken = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetReportsWithHttpMessagesAsync(reportTypes, processingStatuses, marketplaceIds, pageSize, createdSince, createdUntil, nextToken, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Returns report schedule details that match the filters that you specify. /// /// **Usage Plan:** /// /// | Rate (requests per second) | Burst | /// | ---- | ---- | /// | 0.0222 | 10 | /// /// For more information, see "Usage Plans and Rate Limits" in the Selling /// Partner API documentation. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='reportTypes'> /// A list of report types used to filter report schedules. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <object> GetReportSchedulesAsync(this IReportsClient operations, IList <string> reportTypes, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetReportSchedulesWithHttpMessagesAsync(reportTypes, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
private async Task Initialize () { var store = ServiceContainer.Resolve<IDataStore> (); var user = ServiceContainer.Resolve<AuthManager> ().User; reportClient = ServiceContainer.Resolve<IReportsClient> (); workspaceId = await store.ExecuteInTransactionAsync (ctx => ctx.GetRemoteId<WorkspaceData> (user.DefaultWorkspaceId)); startOfWeek = user.StartOfWeek; }
private async Task Initialize() { var store = ServiceContainer.Resolve <IDataStore> (); var user = ServiceContainer.Resolve <AuthManager> ().User; reportClient = ServiceContainer.Resolve <IReportsClient> (); workspaceId = await store.ExecuteInTransactionAsync(ctx => ctx.GetRemoteId <WorkspaceData> (user.DefaultWorkspaceId)); startOfWeek = user.StartOfWeek; }
/// <summary> /// Returns report details for the reports that match the filters that you /// specify. /// /// **Usage Plan:** /// /// | Rate (requests per second) | Burst | /// | ---- | ---- | /// | 0.0222 | 10 | /// /// For more information, see "Usage Plans and Rate Limits" in the Selling /// Partner API documentation. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='reportTypes'> /// A list of report types used to filter reports. When reportTypes is /// provided, the other filter parameters (processingStatuses, marketplaceIds, /// createdSince, createdUntil) and pageSize may also be provided. Either /// reportTypes or nextToken is required. /// </param> /// <param name='processingStatuses'> /// A list of processing statuses used to filter reports. /// </param> /// <param name='marketplaceIds'> /// A list of marketplace identifiers used to filter reports. The reports /// returned will match at least one of the marketplaces that you specify. /// </param> /// <param name='pageSize'> /// The maximum number of reports to return in a single call. /// </param> /// <param name='createdSince'> /// The earliest report creation date and time for reports to include in the /// response, in ISO 8601 date time format. The default is 90 days ago. Reports /// are retained for a maximum of 90 days. /// </param> /// <param name='createdUntil'> /// The latest report creation date and time for reports to include in the /// response, in ISO 8601 date time format. The default is now. /// </param> /// <param name='nextToken'> /// A string token returned in the response to your previous request. nextToken /// is returned when the number of results exceeds the specified pageSize /// value. To get the next page of results, call the getReports operation and /// include this token as the only parameter. Specifying nextToken with any /// other parameters will cause the request to fail. /// </param> public static GetReportsResponse GetReports(this IReportsClient operations, IList <string> reportTypes = default(IList <string>), IList <string> processingStatuses = default(IList <string>), IList <string> marketplaceIds = default(IList <string>), int?pageSize = 10, System.DateTime?createdSince = default(System.DateTime?), System.DateTime?createdUntil = default(System.DateTime?), string nextToken = default(string)) { return(operations.GetReportsAsync(reportTypes, processingStatuses, marketplaceIds, pageSize, createdSince, createdUntil, nextToken).GetAwaiter().GetResult()); }
/// <summary> /// Returns the information required for retrieving a report document's /// contents. This includes a presigned URL for the report document as well as /// the information required to decrypt the document's contents. /// /// **Usage Plan:** /// /// | Rate (requests per second) | Burst | /// | ---- | ---- | /// | 0.0167 | 15 | /// /// For more information, see "Usage Plans and Rate Limits" in the Selling /// Partner API documentation. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='reportDocumentId'> /// The identifier for the report document. /// </param> public static GetReportDocumentResponse GetReportDocument(this IReportsClient operations, string reportDocumentId) { return(operations.GetReportDocumentAsync(reportDocumentId).GetAwaiter().GetResult()); }
/// <summary> /// Returns report schedule details for the report schedule that you specify. /// /// **Usage Plan:** /// /// | Rate (requests per second) | Burst | /// | ---- | ---- | /// | 0.0222 | 10 | /// /// For more information, see "Usage Plans and Rate Limits" in the Selling /// Partner API documentation. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='reportScheduleId'> /// The identifier for the report schedule. This identifier is unique only in /// combination with a seller ID. /// </param> public static GetReportScheduleResponse GetReportSchedule(this IReportsClient operations, string reportScheduleId) { return(operations.GetReportScheduleAsync(reportScheduleId).GetAwaiter().GetResult()); }
/// <summary> /// Creates a report schedule. If a report schedule with the same report type /// and marketplace IDs already exists, it will be cancelled and replaced with /// this one. /// /// **Usage Plan:** /// /// | Rate (requests per second) | Burst | /// | ---- | ---- | /// | 0.0222 | 10 | /// /// For more information, see "Usage Plans and Rate Limits" in the Selling /// Partner API documentation. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='body'> /// </param> public static CreateReportScheduleResponse CreateReportSchedule(this IReportsClient operations, CreateReportScheduleSpecification body) { return(operations.CreateReportScheduleAsync(body).GetAwaiter().GetResult()); }
/// <summary> /// Returns report schedule details that match the filters that you specify. /// /// **Usage Plan:** /// /// | Rate (requests per second) | Burst | /// | ---- | ---- | /// | 0.0222 | 10 | /// /// For more information, see "Usage Plans and Rate Limits" in the Selling /// Partner API documentation. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='reportTypes'> /// A list of report types used to filter report schedules. /// </param> public static GetReportSchedulesResponse GetReportSchedules(this IReportsClient operations, IList <string> reportTypes) { return(operations.GetReportSchedulesAsync(reportTypes).GetAwaiter().GetResult()); }
/// <summary> /// Cancels the report that you specify. Only reports with /// processingStatus=IN_QUEUE can be cancelled. Cancelled reports are returned /// in subsequent calls to the getReport and getReports operations. /// /// **Usage Plan:** /// /// | Rate (requests per second) | Burst | /// | ---- | ---- | /// | 0.0222 | 10 | /// /// For more information, see "Usage Plans and Rate Limits" in the Selling /// Partner API documentation. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='reportId'> /// The identifier for the report. This identifier is unique only in /// combination with a seller ID. /// </param> public static CancelReportResponse CancelReport(this IReportsClient operations, string reportId) { return(operations.CancelReportAsync(reportId).GetAwaiter().GetResult()); }
/// <summary> /// Cancels the report schedule that you specify. /// /// **Usage Plan:** /// /// | Rate (requests per second) | Burst | /// | ---- | ---- | /// | 0.0222 | 10 | /// /// For more information, see "Usage Plans and Rate Limits" in the Selling /// Partner API documentation. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='reportScheduleId'> /// The identifier for the report schedule. This identifier is unique only in /// combination with a seller ID. /// </param> public static ErrorList CancelReportSchedule(this IReportsClient operations, string reportScheduleId) { return(operations.CancelReportScheduleAsync(reportScheduleId).GetAwaiter().GetResult()); }
/// <summary> /// Returns report details (including the reportDocumentId, if available) for /// the report that you specify. /// /// **Usage Plan:** /// /// | Rate (requests per second) | Burst | /// | ---- | ---- | /// | 2.0 | 15 | /// /// For more information, see "Usage Plans and Rate Limits" in the Selling /// Partner API documentation. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='reportId'> /// The identifier for the report. This identifier is unique only in /// combination with a seller ID. /// </param> public static object GetReport(this IReportsClient operations, string reportId) { return(operations.GetReportAsync(reportId).GetAwaiter().GetResult()); }
/// <summary> /// Creates a report. /// /// **Usage Plan:** /// /// | Rate (requests per second) | Burst | /// | ---- | ---- | /// | 0.0167 | 15 | /// /// For more information, see "Usage Plans and Rate Limits" in the Selling /// Partner API documentation. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='body'> /// </param> public static object CreateReport(this IReportsClient operations, CreateReportSpecification body) { return(operations.CreateReportAsync(body).GetAwaiter().GetResult()); }