Skip to content

Commit 2759811

Browse files
authored
Add email_address to UpdateMember (#187)
* Add email_address to UpdateMember * bump * merge 2
1 parent 8dfa567 commit 2759811

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

stytch/b2b/api/organizations_members.py

+8
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ def update(
5959
roles: Optional[List[str]] = None,
6060
preserve_existing_sessions: Optional[bool] = None,
6161
default_mfa_method: Optional[str] = None,
62+
email_address: Optional[str] = None,
6263
method_options: Optional[UpdateRequestOptions] = None,
6364
) -> UpdateResponse:
6465
"""Updates a Member specified by `organization_id` and `member_id`.
@@ -119,6 +120,7 @@ def update(
119120
120121
If this field is provided and a session header is passed into the request, the Member Session must have permission to perform the `update.settings.default-mfa-method` action on the `stytch.member` Resource.
121122
Alternatively, if the Member Session matches the Member associated with the `member_id` passed in the request, the authorization check will also allow a Member Session that has permission to perform the `update.settings.default-mfa-method` action on the `stytch.self` Resource.
123+
- email_address: Updates the Member's `email_address`, if provided.
122124
""" # noqa
123125
headers: Dict[str, str] = {}
124126
if method_options is not None:
@@ -145,6 +147,8 @@ def update(
145147
data["preserve_existing_sessions"] = preserve_existing_sessions
146148
if default_mfa_method is not None:
147149
data["default_mfa_method"] = default_mfa_method
150+
if email_address is not None:
151+
data["email_address"] = email_address
148152

149153
url = self.api_base.url_for(
150154
"/v1/b2b/organizations/{organization_id}/members/{member_id}", data
@@ -165,6 +169,7 @@ async def update_async(
165169
roles: Optional[List[str]] = None,
166170
preserve_existing_sessions: Optional[bool] = None,
167171
default_mfa_method: Optional[str] = None,
172+
email_address: Optional[str] = None,
168173
method_options: Optional[UpdateRequestOptions] = None,
169174
) -> UpdateResponse:
170175
"""Updates a Member specified by `organization_id` and `member_id`.
@@ -225,6 +230,7 @@ async def update_async(
225230
226231
If this field is provided and a session header is passed into the request, the Member Session must have permission to perform the `update.settings.default-mfa-method` action on the `stytch.member` Resource.
227232
Alternatively, if the Member Session matches the Member associated with the `member_id` passed in the request, the authorization check will also allow a Member Session that has permission to perform the `update.settings.default-mfa-method` action on the `stytch.self` Resource.
233+
- email_address: Updates the Member's `email_address`, if provided.
228234
""" # noqa
229235
headers: Dict[str, str] = {}
230236
if method_options is not None:
@@ -251,6 +257,8 @@ async def update_async(
251257
data["preserve_existing_sessions"] = preserve_existing_sessions
252258
if default_mfa_method is not None:
253259
data["default_mfa_method"] = default_mfa_method
260+
if email_address is not None:
261+
data["email_address"] = email_address
254262

255263
url = self.api_base.url_for(
256264
"/v1/b2b/organizations/{organization_id}/members/{member_id}", data

stytch/version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "8.3.0"
1+
__version__ = "8.4.0"

0 commit comments

Comments
 (0)