Skip to content

Commit

Permalink
Enhance ReportStream with Date Filtering Support (#34)
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
butkeraites-hotglue authored Jan 6, 2025
1 parent 5fe2afe commit 88d3180
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tap_xero/streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 88d3180

Please sign in to comment.