Skip to content

fix for Source Amazon Seller Partner: only 100 orders are read #9115

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

Closed
wants to merge 11 commits into from
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def request_params(

def next_page_token(self, response: requests.Response) -> Optional[Mapping[str, Any]]:
stream_data = response.json()
next_page_token = stream_data.get(self.next_page_token_field)
next_page_token = stream_data.get("payload").get(self.next_page_token_field)
if next_page_token:
return {self.next_page_token_field: next_page_token}

Expand Down Expand Up @@ -551,8 +551,8 @@ def request_params(
self, stream_state: Mapping[str, Any], next_page_token: Mapping[str, Any] = None, **kwargs
) -> MutableMapping[str, Any]:
params = super().request_params(stream_state=stream_state, next_page_token=next_page_token, **kwargs)
if not next_page_token:
params.update({"MarketplaceIds": ",".join(self.marketplace_ids)})
#if not next_page_token:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we remove this line?

Copy link
Contributor Author

@prudhvi85 prudhvi85 Dec 27, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the commented if condition

params.update({"MarketplaceIds": ",".join(self.marketplace_ids)})
return params

def parse_response(self, response: requests.Response, stream_state: Mapping[str, Any], **kwargs) -> Iterable[Mapping]:
Expand Down