Interface PromotionExportService

All Known Implementing Classes:
VoucherifyPromotionExportService

public interface PromotionExportService
The PromotionExportService interface defines operations for scheduling and downloading reports.

This interface provides methods for scheduling, generating, and downloading CSV data based on export ID. Implementations of this interface should handle the business logic related to these operations.

  • Method Summary

    Modifier and Type
    Method
    Description
    Creates an export based on the provided ExportModel.
    downloadExport(String exportType, String exportId, String token)
    Downloads the export data based on the provided export type, export ID, and authorization token.
    getExport(String exportId)
    Retrieves the URL for downloading the export associated with the given export ID.
  • Method Details

    • createExport

      File createExport(ExportModel exportModel)
      Creates an export based on the provided ExportModel.
      Parameters:
      exportModel - the export type and sorting parameter name of the ExportModel to be retrieved.
      Returns:
      a File representing the generated export data. If an exception occurs during report generation, it will be logged.
    • getExport

      String getExport(String exportId)
      Retrieves the URL for downloading the export associated with the given export ID.
      Parameters:
      exportId - the ID of the export for which to fetch the report.
      Returns:
      a String representing the URL for downloading the export. If an exception occurs during the retrieval of the report, it will throw an appropriate exception.
    • downloadExport

      File downloadExport(String exportType, String exportId, String token)
      Downloads the export data based on the provided export type, export ID, and authorization token.
      Parameters:
      exportType - the type of export to download.
      exportId - the ID of the export to download.
      token - the authorization token required for downloading the export.
      Returns:
      a File representing the CSV data based on the specified parameters. If an exception occurs during the download, it will throw an appropriate exception.