Skip to content
This repository was archived by the owner on Jun 28, 2024. It is now read-only.

Commit 9c0b3d2

Browse files
fix: Update Provider Category Property Name (#97)
1 parent 214e6ae commit 9c0b3d2

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

seamapi/connect_webviews.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def get(
106106
def create(
107107
self,
108108
accepted_providers: Optional[List[AcceptedProvider]] = None,
109-
category: Optional[str] = None,
109+
provider_category: Optional[str] = None,
110110
custom_redirect_url: Optional[str] = None,
111111
custom_redirect_failure_url: Optional[str] = None,
112112
device_selection_mode: Optional[str] = None,
@@ -116,7 +116,7 @@ def create(
116116
117117
Parameters
118118
----------
119-
category : str, optional
119+
provider_category : str, optional
120120
Provider category e.g. stable
121121
accepted_providers : list[AcceptedProvider], optional
122122
A list of accepted providers e.g. august or noiseaware
@@ -140,15 +140,15 @@ def create(
140140

141141
create_payload = {}
142142

143-
if accepted_providers is None and category is None:
143+
if accepted_providers is None and provider_category is None:
144144
raise Exception(
145145
"Must provide either accepted_providers or category"
146146
)
147147

148148
if accepted_providers is not None:
149149
create_payload["accepted_providers"] = accepted_providers
150-
if category is not None:
151-
create_payload["category"] = category
150+
if provider_category is not None:
151+
create_payload["provider_category"] = provider_category
152152
if custom_redirect_url is not None:
153153
create_payload["custom_redirect_url"] = custom_redirect_url
154154
if custom_redirect_failure_url is not None:

seamapi/types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ def get(self, connect_webview_id: str) -> ConnectWebview:
399399
def create(
400400
self,
401401
accepted_providers: Optional[List[AcceptedProvider]] = None,
402-
category: Optional[str] = None,
402+
provider_category: Optional[str] = None,
403403
) -> ConnectWebview:
404404
raise NotImplementedError
405405

tests/connect_webviews/test_connect_webviews.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ def test_connect_webviews(seam: Seam):
1111
webviews = seam.connect_webviews.list()
1212
assert len(webviews) > 0
1313

14-
# Test with Category
15-
new_webview = seam.connect_webviews.create(category=["stable"])
14+
# Test with provider_category
15+
new_webview = seam.connect_webviews.create(provider_category="stable")
1616
assert created_webview.url is not None
1717

1818
webview = seam.connect_webviews.get(new_webview.connect_webview_id)

0 commit comments

Comments
 (0)