@@ -47,7 +47,7 @@ def with_streaming_response(self) -> MembersResourceWithStreamingResponse:
47
47
def create (
48
48
self ,
49
49
* ,
50
- account_id : object ,
50
+ account_id : str ,
51
51
email : str ,
52
52
roles : List [str ],
53
53
status : Literal ["accepted" , "pending" ] | NotGiven = NOT_GIVEN ,
@@ -74,6 +74,8 @@ def create(
74
74
75
75
timeout: Override the client-level default timeout for this request, in seconds
76
76
"""
77
+ if not account_id :
78
+ raise ValueError (f"Expected a non-empty value for `account_id` but received { account_id !r} " )
77
79
return self ._post (
78
80
f"/accounts/{ account_id } /members" ,
79
81
body = maybe_transform (
@@ -98,7 +100,7 @@ def update(
98
100
self ,
99
101
member_id : str ,
100
102
* ,
101
- account_id : object ,
103
+ account_id : str ,
102
104
roles : Iterable [member_update_params .Role ],
103
105
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
104
106
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -123,6 +125,8 @@ def update(
123
125
124
126
timeout: Override the client-level default timeout for this request, in seconds
125
127
"""
128
+ if not account_id :
129
+ raise ValueError (f"Expected a non-empty value for `account_id` but received { account_id !r} " )
126
130
if not member_id :
127
131
raise ValueError (f"Expected a non-empty value for `member_id` but received { member_id !r} " )
128
132
return self ._put (
@@ -141,7 +145,7 @@ def update(
141
145
def list (
142
146
self ,
143
147
* ,
144
- account_id : object ,
148
+ account_id : str ,
145
149
direction : Literal ["asc" , "desc" ] | NotGiven = NOT_GIVEN ,
146
150
order : Literal ["user.first_name" , "user.last_name" , "user.email" , "status" ] | NotGiven = NOT_GIVEN ,
147
151
page : float | NotGiven = NOT_GIVEN ,
@@ -176,6 +180,8 @@ def list(
176
180
177
181
timeout: Override the client-level default timeout for this request, in seconds
178
182
"""
183
+ if not account_id :
184
+ raise ValueError (f"Expected a non-empty value for `account_id` but received { account_id !r} " )
179
185
return self ._get_api_list (
180
186
f"/accounts/{ account_id } /members" ,
181
187
page = SyncV4PagePaginationArray [MemberListResponse ],
@@ -202,7 +208,7 @@ def delete(
202
208
self ,
203
209
member_id : str ,
204
210
* ,
205
- account_id : object ,
211
+ account_id : str ,
206
212
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
207
213
# The extra values given here take precedence over values defined on the client or passed to this method.
208
214
extra_headers : Headers | None = None ,
@@ -224,6 +230,8 @@ def delete(
224
230
225
231
timeout: Override the client-level default timeout for this request, in seconds
226
232
"""
233
+ if not account_id :
234
+ raise ValueError (f"Expected a non-empty value for `account_id` but received { account_id !r} " )
227
235
if not member_id :
228
236
raise ValueError (f"Expected a non-empty value for `member_id` but received { member_id !r} " )
229
237
return self ._delete (
@@ -242,7 +250,7 @@ def get(
242
250
self ,
243
251
member_id : str ,
244
252
* ,
245
- account_id : object ,
253
+ account_id : str ,
246
254
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
247
255
# The extra values given here take precedence over values defined on the client or passed to this method.
248
256
extra_headers : Headers | None = None ,
@@ -264,6 +272,8 @@ def get(
264
272
265
273
timeout: Override the client-level default timeout for this request, in seconds
266
274
"""
275
+ if not account_id :
276
+ raise ValueError (f"Expected a non-empty value for `account_id` but received { account_id !r} " )
267
277
if not member_id :
268
278
raise ValueError (f"Expected a non-empty value for `member_id` but received { member_id !r} " )
269
279
return self ._get (
@@ -291,7 +301,7 @@ def with_streaming_response(self) -> AsyncMembersResourceWithStreamingResponse:
291
301
async def create (
292
302
self ,
293
303
* ,
294
- account_id : object ,
304
+ account_id : str ,
295
305
email : str ,
296
306
roles : List [str ],
297
307
status : Literal ["accepted" , "pending" ] | NotGiven = NOT_GIVEN ,
@@ -318,6 +328,8 @@ async def create(
318
328
319
329
timeout: Override the client-level default timeout for this request, in seconds
320
330
"""
331
+ if not account_id :
332
+ raise ValueError (f"Expected a non-empty value for `account_id` but received { account_id !r} " )
321
333
return await self ._post (
322
334
f"/accounts/{ account_id } /members" ,
323
335
body = await async_maybe_transform (
@@ -342,7 +354,7 @@ async def update(
342
354
self ,
343
355
member_id : str ,
344
356
* ,
345
- account_id : object ,
357
+ account_id : str ,
346
358
roles : Iterable [member_update_params .Role ],
347
359
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
348
360
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -367,6 +379,8 @@ async def update(
367
379
368
380
timeout: Override the client-level default timeout for this request, in seconds
369
381
"""
382
+ if not account_id :
383
+ raise ValueError (f"Expected a non-empty value for `account_id` but received { account_id !r} " )
370
384
if not member_id :
371
385
raise ValueError (f"Expected a non-empty value for `member_id` but received { member_id !r} " )
372
386
return await self ._put (
@@ -385,7 +399,7 @@ async def update(
385
399
def list (
386
400
self ,
387
401
* ,
388
- account_id : object ,
402
+ account_id : str ,
389
403
direction : Literal ["asc" , "desc" ] | NotGiven = NOT_GIVEN ,
390
404
order : Literal ["user.first_name" , "user.last_name" , "user.email" , "status" ] | NotGiven = NOT_GIVEN ,
391
405
page : float | NotGiven = NOT_GIVEN ,
@@ -420,6 +434,8 @@ def list(
420
434
421
435
timeout: Override the client-level default timeout for this request, in seconds
422
436
"""
437
+ if not account_id :
438
+ raise ValueError (f"Expected a non-empty value for `account_id` but received { account_id !r} " )
423
439
return self ._get_api_list (
424
440
f"/accounts/{ account_id } /members" ,
425
441
page = AsyncV4PagePaginationArray [MemberListResponse ],
@@ -446,7 +462,7 @@ async def delete(
446
462
self ,
447
463
member_id : str ,
448
464
* ,
449
- account_id : object ,
465
+ account_id : str ,
450
466
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
451
467
# The extra values given here take precedence over values defined on the client or passed to this method.
452
468
extra_headers : Headers | None = None ,
@@ -468,6 +484,8 @@ async def delete(
468
484
469
485
timeout: Override the client-level default timeout for this request, in seconds
470
486
"""
487
+ if not account_id :
488
+ raise ValueError (f"Expected a non-empty value for `account_id` but received { account_id !r} " )
471
489
if not member_id :
472
490
raise ValueError (f"Expected a non-empty value for `member_id` but received { member_id !r} " )
473
491
return await self ._delete (
@@ -486,7 +504,7 @@ async def get(
486
504
self ,
487
505
member_id : str ,
488
506
* ,
489
- account_id : object ,
507
+ account_id : str ,
490
508
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
491
509
# The extra values given here take precedence over values defined on the client or passed to this method.
492
510
extra_headers : Headers | None = None ,
@@ -508,6 +526,8 @@ async def get(
508
526
509
527
timeout: Override the client-level default timeout for this request, in seconds
510
528
"""
529
+ if not account_id :
530
+ raise ValueError (f"Expected a non-empty value for `account_id` but received { account_id !r} " )
511
531
if not member_id :
512
532
raise ValueError (f"Expected a non-empty value for `member_id` but received { member_id !r} " )
513
533
return await self ._get (
0 commit comments