Skip to content

Commit

Permalink
Source Amazon Seller Partner: Fix reportPeriod day query params (#3…
Browse files Browse the repository at this point in the history
…6895)

Signed-off-by: Artem Inzhyyants <artem.inzhyyants@gmail.com>
  • Loading branch information
artem1205 committed Apr 10, 2024
1 parent 371af95 commit ca3bbe5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 21 deletions.
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 <contact@airbyte.io>"]
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 @@ -752,24 +752,6 @@ class IncrementalAnalyticsStream(AnalyticsStream):
def cursor_field(self) -> Union[str, List[str]]:
return "endDate"

def _report_data(
self,
sync_mode: SyncMode,
cursor_field: List[str] = None,
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

def parse_response(
self,
response: requests.Response,
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

0 comments on commit ca3bbe5

Please sign in to comment.