From 5baf8d33472f76549fb7b5a666b51199a98b6f84 Mon Sep 17 00:00:00 2001 From: Guillaume Chinal Date: Sat, 11 Jan 2025 12:09:16 +0100 Subject: [PATCH] fix: missing order refund status --- src/psebpconnector/connector.py | 2 +- src/psebpconnector/connector_configuration.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/psebpconnector/connector.py b/src/psebpconnector/connector.py index 3ab5ddc..236bf65 100644 --- a/src/psebpconnector/connector.py +++ b/src/psebpconnector/connector.py @@ -398,7 +398,7 @@ def export_product(self, product_id: int): def export_orders_and_products(self): exported_orders_counter = 0 - for order in self.webservice.get_orders_to_export(self.config.order_valid_status): + for order in self.webservice.get_orders_to_export(self.config.order_valid_status, self.config.order_refund_status): if self.config.order_limit and exported_orders_counter >= self.config.order_limit: break try: diff --git a/src/psebpconnector/connector_configuration.py b/src/psebpconnector/connector_configuration.py index 472b4e3..458a624 100644 --- a/src/psebpconnector/connector_configuration.py +++ b/src/psebpconnector/connector_configuration.py @@ -34,6 +34,7 @@ class ConnectorConfiguration: apikey: str ebp_executable_path: Path order_valid_status: List[str] + order_refund_status: List[str] payment_method_mapping_file_path: Path vat_mapping_file_path: Path working_directory: Path @@ -77,6 +78,7 @@ def load_required_options(self): setattr(self, key, self._config.get('main', key)) self.ebp_executable_path = Path(self.ebp_executable_path) self.order_valid_status = [status.strip() for status in self.order_valid_status.split(',')] + self.order_refund_status = [status.strip() for status in self.order_refund_status.split(',')] self.payment_method_mapping_file_path = Path(self.payment_method_mapping_file_path) self.vat_mapping_file_path = Path(self.vat_mapping_file_path) self.working_directory = Path(self.working_directory)