Skip to content

Source Amazon Seller Partner: Fix reportPeriod day query params #36895

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ data:
connectorSubtype: api
connectorType: source
definitionId: e55879a8-0ef8-4557-abcf-ab34c53ec460
dockerImageTag: 4.2.0
dockerImageTag: 4.2.1
dockerRepository: airbyte/source-amazon-seller-partner
documentationUrl: https://docs.airbyte.com/integrations/sources/amazon-seller-partner
githubIssueLabel: source-amazon-seller-partner
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

[tool.poetry]
version = "4.2.0"
version = "4.2.1"
name = "source-amazon-seller-partner"
description = "Source implementation for Amazon Seller Partner."
authors = ["Airbyte <[email protected]>"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ def _report_data(
) -> Mapping[str, Any]:
data = super()._report_data(sync_mode, cursor_field, stream_slice, stream_state)
options = self.report_options()
if options and options.get("reportPeriod") is not None:
if options and options.get("reportPeriod"):
data.update(self._augmented_data(options))
return data

Expand Down Expand Up @@ -759,16 +759,7 @@ def _report_data(
stream_slice: Mapping[str, Any] = None,
stream_state: Mapping[str, Any] = None,
) -> Mapping[str, Any]:
data = super()._report_data(sync_mode, cursor_field, stream_slice, stream_state)
if stream_slice:
data_times = {}
if stream_slice.get("dataStartTime"):
data_times["dataStartTime"] = stream_slice["dataStartTime"]
if stream_slice.get("dataEndTime"):
data_times["dataEndTime"] = stream_slice["dataEndTime"]
data.update(data_times)

return data
return super()._report_data(sync_mode, cursor_field, stream_slice, stream_state)

def parse_response(
self,
Expand Down
1 change: 1 addition & 0 deletions docs/integrations/sources/amazon-seller-partner.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ Information about rate limits you may find [here](https://developer-docs.amazon.

| Version | Date | Pull Request | Subject |
|:---------|:-----------|:-----------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `4.2.1` | 2024-04-08 | [\#36895](https://github.com/airbytehq/airbyte/pull/36895) | Fix `reportPeriod` day query params |
| `4.2.0` | 2024-03-19 | [\#36267](https://github.com/airbytehq/airbyte/pull/36267) | Pin airbyte-cdk version to `^0` |
| `4.1.0` | 2024-03-12 | [\#35954](https://github.com/airbytehq/airbyte/pull/35954) | Add `GET_VENDOR_FORECASTING_FRESH_REPORT` and `GET_VENDOR_FORECASTING_RETAIL_REPORT` streams |
| `4.0.0` | 2024-02-23 | [\#35439](https://github.com/airbytehq/airbyte/pull/35439) | Update schema for the `GET_FBA_STORAGE_FEE_CHARGES_DATA` stream |
Expand Down
Loading