From 2119286807fbb376fa791ebaf7596927e8042f5c Mon Sep 17 00:00:00 2001 From: Renan Butkeraites Date: Fri, 3 Jan 2025 18:56:42 -0300 Subject: [PATCH] Enhance ReportStream with Date Filtering Support - Added JSON import to the streams.py file. - Updated the ReportStream class to include date filtering options (fromDate, toDate) in the filter options for improved data retrieval. --- tap_xero/streams.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tap_xero/streams.py b/tap_xero/streams.py index 3903cc9..de06c16 100644 --- a/tap_xero/streams.py +++ b/tap_xero/streams.py @@ -135,6 +135,7 @@ def sync(self, ctx): self.filter_options.update(dict(trackingCategoryID=tracking_category_id, trackingCategoryID2=tracking_category_id_2)) else: LOGGER.info(f"Tracking Category 1 or Tracking Category 2 not found for {self.tap_stream_id}") + self.filter_options.update(dict(fromDate=from_date, toDate=to_date)) else: self.filter_options.update(dict(fromDate=from_date, toDate=to_date)) records = _make_request(ctx, self.tap_stream_name, self.filter_options)