Skip to content

Commit

Permalink
fix: ignore pagination for sla_policies and custom roles streams
Browse files Browse the repository at this point in the history
  • Loading branch information
am6010 committed Jul 3, 2024
1 parent c02813e commit 9b9bc1c
Showing 1 changed file with 3 additions and 2 deletions.
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

0 comments on commit 9b9bc1c

Please sign in to comment.