File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -229,6 +229,7 @@ def invite(
229
229
] = None , # send invite via text message, default is according to project settings
230
230
additional_login_ids : Optional [List [str ]] = None ,
231
231
sso_app_ids : Optional [List [str ]] = None ,
232
+ template_id : str = "" ,
232
233
) -> dict :
233
234
"""
234
235
Create a new user and invite them via an email / text message.
@@ -267,6 +268,7 @@ def invite(
267
268
send_sms ,
268
269
additional_login_ids ,
269
270
sso_app_ids ,
271
+ template_id ,
270
272
),
271
273
pswd = self ._auth .management_key ,
272
274
)
@@ -1652,6 +1654,7 @@ def _compose_create_body(
1652
1654
send_sms : Optional [bool ],
1653
1655
additional_login_ids : Optional [List [str ]],
1654
1656
sso_app_ids : Optional [List [str ]] = None ,
1657
+ template_id : str = "" ,
1655
1658
) -> dict :
1656
1659
body = User ._compose_update_body (
1657
1660
login_id = login_id ,
@@ -1680,6 +1683,8 @@ def _compose_create_body(
1680
1683
body ["sendMail" ] = send_mail
1681
1684
if send_sms is not None :
1682
1685
body ["sendSMS" ] = send_sms
1686
+ if template_id != "" :
1687
+ body ["templateId" ] = template_id
1683
1688
return body
1684
1689
1685
1690
@staticmethod
Original file line number Diff line number Diff line change @@ -236,6 +236,7 @@ def test_invite(self):
236
236
invite_url = "invite.me" ,
237
237
send_sms = True ,
238
238
sso_app_ids = ["app1" , "app2" ],
239
+ template_id = "tid" ,
239
240
)
240
241
user = resp ["user" ]
241
242
self .assertEqual (user ["id" ], "u1" )
@@ -264,6 +265,7 @@ def test_invite(self):
264
265
"sendSMS" : True ,
265
266
"additionalLoginIds" : None ,
266
267
"ssoAppIDs" : ["app1" , "app2" ],
268
+ "templateId" : "tid" ,
267
269
},
268
270
allow_redirects = False ,
269
271
verify = True ,
You can’t perform that action at this time.
0 commit comments