Class VoucherifyPromotionExportService
java.lang.Object
org.bhn.promotion.voucherify.service.VoucherifyPromotionExportService
- All Implemented Interfaces:
PromotionExportService
@Service
public class VoucherifyPromotionExportService
extends Object
implements PromotionExportService
This class implements the
PromotionExportService interface and provides methods related
to exporting reports using the Voucherify service.
It contains logic for creating exports, retrieving export URLs, and downloading export data.
-
Constructor Summary
ConstructorsConstructorDescriptionVoucherifyPromotionExportService(VoucherifyClient voucherifyClient, VoucherifyProxy voucherifyProxy) -
Method Summary
Modifier and TypeMethodDescriptioncreateExport(ExportModel exportModel) Creates an export based on the providedExportModel.downloadExport(String exportType, String exportId, String token) Downloads the export data based on the provided export type, export ID, and authorization token.Retrieves the URL for downloading the export associated with the given export ID.
-
Constructor Details
-
VoucherifyPromotionExportService
@Autowired public VoucherifyPromotionExportService(VoucherifyClient voucherifyClient, VoucherifyProxy voucherifyProxy)
-
-
Method Details
-
createExport
Creates an export based on the providedExportModel.- Specified by:
createExportin interfacePromotionExportService- Parameters:
exportModel- the export type and sorting parameter name of theExportModel.- Returns:
- a
Filerepresenting the generated export data, or null if an exception occurs. Logs any exceptions that occur during the process.
-
getExport
Retrieves the URL for downloading the export associated with the given export ID.- Specified by:
getExportin interfacePromotionExportService- Parameters:
exportId- the ID of the export for which to fetch the report.- Returns:
- a
Stringrepresenting the URL for downloading the export, or null if an exception occurs. Logs any exceptions that occur during the retrieval process.
-
downloadExport
Downloads the export data based on the provided export type, export ID, and authorization token.- Specified by:
downloadExportin interfacePromotionExportService- 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
Filerepresenting the CSV data based on the specified parameters, or null if an exception occurs. Logs any exceptions that occur during the download process.
-