Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ignore pagination for sla_policies and custom roles streams #197

Merged
merged 1 commit into from
Jul 4, 2024
Merged
Changes from all 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 @@ -412,7 +412,7 @@ def next_page_token(self, response: requests.Response) -> Optional[Mapping[str,
return {"page[after]": meta.get("after_cursor")} if meta.get("has_more") else None

def request_params(self, next_page_token: Mapping[str, Any] = None, **kwargs) -> MutableMapping[str, Any]:
params = {"page[size]": self.page_size}
params = {"page[size]": self.page_size} if self.page_size else {}
if next_page_token:
params.update(next_page_token)
return params
Expand Down Expand Up @@ -837,7 +837,7 @@ class Tags(SourceZendeskSupportFullRefreshStream):

class SlaPolicies(SourceZendeskSupportFullRefreshStream):
"""SlaPolicies stream: https://developer.zendesk.com/api-reference/ticketing/business-rules/sla_policies/"""

page_size = None
def path(self, *args, **kwargs) -> str:
return "slas/policies.json"

Expand All @@ -848,6 +848,7 @@ class Brands(SourceZendeskSupportFullRefreshStream):

class CustomRoles(SourceZendeskSupportFullRefreshStream):
"""CustomRoles stream: https://developer.zendesk.com/api-reference/ticketing/account-configuration/custom_roles/#list-custom-roles"""
page_size = None


class Schedules(SourceZendeskSupportFullRefreshStream):
Expand Down
Loading