dub 0.31.0__py3-none-any.whl → 0.33.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dub/_version.py +3 -3
- dub/analytics.py +6 -6
- dub/commissions.py +12 -12
- dub/customers.py +24 -321
- dub/domains.py +34 -38
- dub/embed_tokens.py +6 -6
- dub/events.py +6 -6
- dub/folders.py +24 -28
- dub/links.py +58 -74
- dub/models/components/__init__.py +38 -6
- dub/models/components/analyticstopurls.py +2 -2
- dub/models/components/clickevent.py +10 -9
- dub/models/components/commissioncreatedevent.py +5 -2
- dub/models/components/folderschema.py +6 -1
- dub/models/components/leadcreatedevent.py +15 -11
- dub/models/components/leadevent.py +10 -9
- dub/models/components/linkclickedevent.py +10 -9
- dub/models/components/linkschema.py +9 -3
- dub/models/components/{tagschema.py → linktagschema.py} +2 -2
- dub/models/components/linkwebhookevent.py +10 -9
- dub/models/components/partnerapplicationsubmittedevent.py +269 -0
- dub/models/components/partnerenrolledevent.py +93 -29
- dub/models/components/salecreatedevent.py +15 -11
- dub/models/components/saleevent.py +10 -9
- dub/models/components/webhookevent.py +6 -0
- dub/models/components/workspaceschema.py +11 -0
- dub/models/errors/badrequest.py +1 -1
- dub/models/errors/conflict.py +1 -1
- dub/models/errors/duberror.py +1 -1
- dub/models/errors/forbidden.py +1 -1
- dub/models/errors/internalservererror.py +1 -1
- dub/models/errors/inviteexpired.py +1 -1
- dub/models/errors/no_response_error.py +1 -1
- dub/models/errors/notfound.py +1 -1
- dub/models/errors/ratelimitexceeded.py +1 -1
- dub/models/errors/responsevalidationerror.py +1 -1
- dub/models/errors/sdkerror.py +1 -1
- dub/models/errors/unauthorized.py +1 -1
- dub/models/errors/unprocessableentity.py +1 -1
- dub/models/operations/__init__.py +17 -35
- dub/models/operations/banpartner.py +83 -0
- dub/models/operations/bulkcreatelinks.py +2 -2
- dub/models/operations/createfolder.py +8 -3
- dub/models/operations/createlink.py +2 -2
- dub/models/operations/createpartner.py +93 -29
- dub/models/operations/listcommissions.py +13 -2
- dub/models/operations/listevents.py +10 -0
- dub/models/operations/listpartners.py +107 -47
- dub/models/operations/retrieveanalytics.py +16 -1
- dub/models/operations/retrievelinks.py +42 -7
- dub/models/operations/retrievepartneranalytics.py +51 -11
- dub/models/operations/tracklead.py +2 -2
- dub/models/operations/updatecommission.py +7 -2
- dub/models/operations/updatefolder.py +8 -3
- dub/models/operations/updatelink.py +2 -2
- dub/models/operations/upsertlink.py +2 -2
- dub/partners.py +310 -36
- dub/qr_codes.py +4 -4
- dub/tags.py +24 -32
- dub/track.py +12 -20
- dub/utils/retries.py +69 -5
- dub/utils/unmarshal_json_response.py +15 -1
- dub/workspaces.py +12 -20
- {dub-0.31.0.dist-info → dub-0.33.0.dist-info}/METADATA +2 -21
- {dub-0.31.0.dist-info → dub-0.33.0.dist-info}/RECORD +67 -66
- dub/models/operations/createcustomer.py +0 -382
- {dub-0.31.0.dist-info → dub-0.33.0.dist-info}/WHEEL +0 -0
- {dub-0.31.0.dist-info → dub-0.33.0.dist-info}/licenses/LICENSE +0 -0
dub/customers.py
CHANGED
|
@@ -7,7 +7,6 @@ from dub.models import errors, operations
|
|
|
7
7
|
from dub.types import BaseModel, OptionalNullable, UNSET
|
|
8
8
|
from dub.utils.unmarshal_json_response import unmarshal_json_response
|
|
9
9
|
from typing import Any, List, Mapping, Optional, Union, cast
|
|
10
|
-
from typing_extensions import deprecated
|
|
11
10
|
|
|
12
11
|
|
|
13
12
|
class Customers(BaseSDK):
|
|
@@ -21,7 +20,7 @@ class Customers(BaseSDK):
|
|
|
21
20
|
server_url: Optional[str] = None,
|
|
22
21
|
timeout_ms: Optional[int] = None,
|
|
23
22
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
24
|
-
) ->
|
|
23
|
+
) -> List[operations.GetCustomersResponseBody]:
|
|
25
24
|
r"""Retrieve a list of customers
|
|
26
25
|
|
|
27
26
|
Retrieve a list of customers for the authenticated workspace.
|
|
@@ -75,7 +74,7 @@ class Customers(BaseSDK):
|
|
|
75
74
|
config=self.sdk_configuration,
|
|
76
75
|
base_url=base_url or "",
|
|
77
76
|
operation_id="getCustomers",
|
|
78
|
-
oauth2_scopes=
|
|
77
|
+
oauth2_scopes=None,
|
|
79
78
|
security_source=self.sdk_configuration.security,
|
|
80
79
|
),
|
|
81
80
|
request=req,
|
|
@@ -98,7 +97,7 @@ class Customers(BaseSDK):
|
|
|
98
97
|
response_data: Any = None
|
|
99
98
|
if utils.match_response(http_res, "200", "application/json"):
|
|
100
99
|
return unmarshal_json_response(
|
|
101
|
-
|
|
100
|
+
List[operations.GetCustomersResponseBody], http_res
|
|
102
101
|
)
|
|
103
102
|
if utils.match_response(http_res, "400", "application/json"):
|
|
104
103
|
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
@@ -152,7 +151,7 @@ class Customers(BaseSDK):
|
|
|
152
151
|
server_url: Optional[str] = None,
|
|
153
152
|
timeout_ms: Optional[int] = None,
|
|
154
153
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
155
|
-
) ->
|
|
154
|
+
) -> List[operations.GetCustomersResponseBody]:
|
|
156
155
|
r"""Retrieve a list of customers
|
|
157
156
|
|
|
158
157
|
Retrieve a list of customers for the authenticated workspace.
|
|
@@ -206,7 +205,7 @@ class Customers(BaseSDK):
|
|
|
206
205
|
config=self.sdk_configuration,
|
|
207
206
|
base_url=base_url or "",
|
|
208
207
|
operation_id="getCustomers",
|
|
209
|
-
oauth2_scopes=
|
|
208
|
+
oauth2_scopes=None,
|
|
210
209
|
security_source=self.sdk_configuration.security,
|
|
211
210
|
),
|
|
212
211
|
request=req,
|
|
@@ -229,299 +228,7 @@ class Customers(BaseSDK):
|
|
|
229
228
|
response_data: Any = None
|
|
230
229
|
if utils.match_response(http_res, "200", "application/json"):
|
|
231
230
|
return unmarshal_json_response(
|
|
232
|
-
|
|
233
|
-
)
|
|
234
|
-
if utils.match_response(http_res, "400", "application/json"):
|
|
235
|
-
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
236
|
-
raise errors.BadRequest(response_data, http_res)
|
|
237
|
-
if utils.match_response(http_res, "401", "application/json"):
|
|
238
|
-
response_data = unmarshal_json_response(errors.UnauthorizedData, http_res)
|
|
239
|
-
raise errors.Unauthorized(response_data, http_res)
|
|
240
|
-
if utils.match_response(http_res, "403", "application/json"):
|
|
241
|
-
response_data = unmarshal_json_response(errors.ForbiddenData, http_res)
|
|
242
|
-
raise errors.Forbidden(response_data, http_res)
|
|
243
|
-
if utils.match_response(http_res, "404", "application/json"):
|
|
244
|
-
response_data = unmarshal_json_response(errors.NotFoundData, http_res)
|
|
245
|
-
raise errors.NotFound(response_data, http_res)
|
|
246
|
-
if utils.match_response(http_res, "409", "application/json"):
|
|
247
|
-
response_data = unmarshal_json_response(errors.ConflictData, http_res)
|
|
248
|
-
raise errors.Conflict(response_data, http_res)
|
|
249
|
-
if utils.match_response(http_res, "410", "application/json"):
|
|
250
|
-
response_data = unmarshal_json_response(errors.InviteExpiredData, http_res)
|
|
251
|
-
raise errors.InviteExpired(response_data, http_res)
|
|
252
|
-
if utils.match_response(http_res, "422", "application/json"):
|
|
253
|
-
response_data = unmarshal_json_response(
|
|
254
|
-
errors.UnprocessableEntityData, http_res
|
|
255
|
-
)
|
|
256
|
-
raise errors.UnprocessableEntity(response_data, http_res)
|
|
257
|
-
if utils.match_response(http_res, "429", "application/json"):
|
|
258
|
-
response_data = unmarshal_json_response(
|
|
259
|
-
errors.RateLimitExceededData, http_res
|
|
260
|
-
)
|
|
261
|
-
raise errors.RateLimitExceeded(response_data, http_res)
|
|
262
|
-
if utils.match_response(http_res, "500", "application/json"):
|
|
263
|
-
response_data = unmarshal_json_response(
|
|
264
|
-
errors.InternalServerErrorData, http_res
|
|
265
|
-
)
|
|
266
|
-
raise errors.InternalServerError(response_data, http_res)
|
|
267
|
-
if utils.match_response(http_res, "4XX", "*"):
|
|
268
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
269
|
-
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
|
270
|
-
if utils.match_response(http_res, "5XX", "*"):
|
|
271
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
272
|
-
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
|
273
|
-
|
|
274
|
-
raise errors.SDKError("Unexpected response received", http_res)
|
|
275
|
-
|
|
276
|
-
@deprecated(
|
|
277
|
-
"warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible."
|
|
278
|
-
)
|
|
279
|
-
def create(
|
|
280
|
-
self,
|
|
281
|
-
*,
|
|
282
|
-
request: Optional[
|
|
283
|
-
Union[
|
|
284
|
-
operations.CreateCustomerRequestBody,
|
|
285
|
-
operations.CreateCustomerRequestBodyTypedDict,
|
|
286
|
-
]
|
|
287
|
-
] = None,
|
|
288
|
-
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
289
|
-
server_url: Optional[str] = None,
|
|
290
|
-
timeout_ms: Optional[int] = None,
|
|
291
|
-
http_headers: Optional[Mapping[str, str]] = None,
|
|
292
|
-
) -> Optional[operations.CreateCustomerResponseBody]:
|
|
293
|
-
r"""Create a customer
|
|
294
|
-
|
|
295
|
-
[Deprecated]: Customer creation can only be done via tracking a lead event. Use the /track/lead endpoint instead.
|
|
296
|
-
|
|
297
|
-
:param request: The request object to send.
|
|
298
|
-
:param retries: Override the default retry configuration for this method
|
|
299
|
-
:param server_url: Override the default server URL for this method
|
|
300
|
-
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
301
|
-
:param http_headers: Additional headers to set or replace on requests.
|
|
302
|
-
"""
|
|
303
|
-
base_url = None
|
|
304
|
-
url_variables = None
|
|
305
|
-
if timeout_ms is None:
|
|
306
|
-
timeout_ms = self.sdk_configuration.timeout_ms
|
|
307
|
-
|
|
308
|
-
if server_url is not None:
|
|
309
|
-
base_url = server_url
|
|
310
|
-
else:
|
|
311
|
-
base_url = self._get_url(base_url, url_variables)
|
|
312
|
-
|
|
313
|
-
if not isinstance(request, BaseModel):
|
|
314
|
-
request = utils.unmarshal(
|
|
315
|
-
request, Optional[operations.CreateCustomerRequestBody]
|
|
316
|
-
)
|
|
317
|
-
request = cast(Optional[operations.CreateCustomerRequestBody], request)
|
|
318
|
-
|
|
319
|
-
req = self._build_request(
|
|
320
|
-
method="POST",
|
|
321
|
-
path="/customers",
|
|
322
|
-
base_url=base_url,
|
|
323
|
-
url_variables=url_variables,
|
|
324
|
-
request=request,
|
|
325
|
-
request_body_required=False,
|
|
326
|
-
request_has_path_params=False,
|
|
327
|
-
request_has_query_params=True,
|
|
328
|
-
user_agent_header="user-agent",
|
|
329
|
-
accept_header_value="application/json",
|
|
330
|
-
http_headers=http_headers,
|
|
331
|
-
security=self.sdk_configuration.security,
|
|
332
|
-
get_serialized_body=lambda: utils.serialize_request_body(
|
|
333
|
-
request,
|
|
334
|
-
False,
|
|
335
|
-
True,
|
|
336
|
-
"json",
|
|
337
|
-
Optional[operations.CreateCustomerRequestBody],
|
|
338
|
-
),
|
|
339
|
-
timeout_ms=timeout_ms,
|
|
340
|
-
)
|
|
341
|
-
|
|
342
|
-
if retries == UNSET:
|
|
343
|
-
if self.sdk_configuration.retry_config is not UNSET:
|
|
344
|
-
retries = self.sdk_configuration.retry_config
|
|
345
|
-
|
|
346
|
-
retry_config = None
|
|
347
|
-
if isinstance(retries, utils.RetryConfig):
|
|
348
|
-
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
349
|
-
|
|
350
|
-
http_res = self.do_request(
|
|
351
|
-
hook_ctx=HookContext(
|
|
352
|
-
config=self.sdk_configuration,
|
|
353
|
-
base_url=base_url or "",
|
|
354
|
-
operation_id="createCustomer",
|
|
355
|
-
oauth2_scopes=[],
|
|
356
|
-
security_source=self.sdk_configuration.security,
|
|
357
|
-
),
|
|
358
|
-
request=req,
|
|
359
|
-
error_status_codes=[
|
|
360
|
-
"400",
|
|
361
|
-
"401",
|
|
362
|
-
"403",
|
|
363
|
-
"404",
|
|
364
|
-
"409",
|
|
365
|
-
"410",
|
|
366
|
-
"422",
|
|
367
|
-
"429",
|
|
368
|
-
"4XX",
|
|
369
|
-
"500",
|
|
370
|
-
"5XX",
|
|
371
|
-
],
|
|
372
|
-
retry_config=retry_config,
|
|
373
|
-
)
|
|
374
|
-
|
|
375
|
-
response_data: Any = None
|
|
376
|
-
if utils.match_response(http_res, "201", "application/json"):
|
|
377
|
-
return unmarshal_json_response(
|
|
378
|
-
Optional[operations.CreateCustomerResponseBody], http_res
|
|
379
|
-
)
|
|
380
|
-
if utils.match_response(http_res, "400", "application/json"):
|
|
381
|
-
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
382
|
-
raise errors.BadRequest(response_data, http_res)
|
|
383
|
-
if utils.match_response(http_res, "401", "application/json"):
|
|
384
|
-
response_data = unmarshal_json_response(errors.UnauthorizedData, http_res)
|
|
385
|
-
raise errors.Unauthorized(response_data, http_res)
|
|
386
|
-
if utils.match_response(http_res, "403", "application/json"):
|
|
387
|
-
response_data = unmarshal_json_response(errors.ForbiddenData, http_res)
|
|
388
|
-
raise errors.Forbidden(response_data, http_res)
|
|
389
|
-
if utils.match_response(http_res, "404", "application/json"):
|
|
390
|
-
response_data = unmarshal_json_response(errors.NotFoundData, http_res)
|
|
391
|
-
raise errors.NotFound(response_data, http_res)
|
|
392
|
-
if utils.match_response(http_res, "409", "application/json"):
|
|
393
|
-
response_data = unmarshal_json_response(errors.ConflictData, http_res)
|
|
394
|
-
raise errors.Conflict(response_data, http_res)
|
|
395
|
-
if utils.match_response(http_res, "410", "application/json"):
|
|
396
|
-
response_data = unmarshal_json_response(errors.InviteExpiredData, http_res)
|
|
397
|
-
raise errors.InviteExpired(response_data, http_res)
|
|
398
|
-
if utils.match_response(http_res, "422", "application/json"):
|
|
399
|
-
response_data = unmarshal_json_response(
|
|
400
|
-
errors.UnprocessableEntityData, http_res
|
|
401
|
-
)
|
|
402
|
-
raise errors.UnprocessableEntity(response_data, http_res)
|
|
403
|
-
if utils.match_response(http_res, "429", "application/json"):
|
|
404
|
-
response_data = unmarshal_json_response(
|
|
405
|
-
errors.RateLimitExceededData, http_res
|
|
406
|
-
)
|
|
407
|
-
raise errors.RateLimitExceeded(response_data, http_res)
|
|
408
|
-
if utils.match_response(http_res, "500", "application/json"):
|
|
409
|
-
response_data = unmarshal_json_response(
|
|
410
|
-
errors.InternalServerErrorData, http_res
|
|
411
|
-
)
|
|
412
|
-
raise errors.InternalServerError(response_data, http_res)
|
|
413
|
-
if utils.match_response(http_res, "4XX", "*"):
|
|
414
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
415
|
-
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
|
416
|
-
if utils.match_response(http_res, "5XX", "*"):
|
|
417
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
418
|
-
raise errors.SDKError("API error occurred", http_res, http_res_text)
|
|
419
|
-
|
|
420
|
-
raise errors.SDKError("Unexpected response received", http_res)
|
|
421
|
-
|
|
422
|
-
@deprecated(
|
|
423
|
-
"warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible."
|
|
424
|
-
)
|
|
425
|
-
async def create_async(
|
|
426
|
-
self,
|
|
427
|
-
*,
|
|
428
|
-
request: Optional[
|
|
429
|
-
Union[
|
|
430
|
-
operations.CreateCustomerRequestBody,
|
|
431
|
-
operations.CreateCustomerRequestBodyTypedDict,
|
|
432
|
-
]
|
|
433
|
-
] = None,
|
|
434
|
-
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
435
|
-
server_url: Optional[str] = None,
|
|
436
|
-
timeout_ms: Optional[int] = None,
|
|
437
|
-
http_headers: Optional[Mapping[str, str]] = None,
|
|
438
|
-
) -> Optional[operations.CreateCustomerResponseBody]:
|
|
439
|
-
r"""Create a customer
|
|
440
|
-
|
|
441
|
-
[Deprecated]: Customer creation can only be done via tracking a lead event. Use the /track/lead endpoint instead.
|
|
442
|
-
|
|
443
|
-
:param request: The request object to send.
|
|
444
|
-
:param retries: Override the default retry configuration for this method
|
|
445
|
-
:param server_url: Override the default server URL for this method
|
|
446
|
-
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
447
|
-
:param http_headers: Additional headers to set or replace on requests.
|
|
448
|
-
"""
|
|
449
|
-
base_url = None
|
|
450
|
-
url_variables = None
|
|
451
|
-
if timeout_ms is None:
|
|
452
|
-
timeout_ms = self.sdk_configuration.timeout_ms
|
|
453
|
-
|
|
454
|
-
if server_url is not None:
|
|
455
|
-
base_url = server_url
|
|
456
|
-
else:
|
|
457
|
-
base_url = self._get_url(base_url, url_variables)
|
|
458
|
-
|
|
459
|
-
if not isinstance(request, BaseModel):
|
|
460
|
-
request = utils.unmarshal(
|
|
461
|
-
request, Optional[operations.CreateCustomerRequestBody]
|
|
462
|
-
)
|
|
463
|
-
request = cast(Optional[operations.CreateCustomerRequestBody], request)
|
|
464
|
-
|
|
465
|
-
req = self._build_request_async(
|
|
466
|
-
method="POST",
|
|
467
|
-
path="/customers",
|
|
468
|
-
base_url=base_url,
|
|
469
|
-
url_variables=url_variables,
|
|
470
|
-
request=request,
|
|
471
|
-
request_body_required=False,
|
|
472
|
-
request_has_path_params=False,
|
|
473
|
-
request_has_query_params=True,
|
|
474
|
-
user_agent_header="user-agent",
|
|
475
|
-
accept_header_value="application/json",
|
|
476
|
-
http_headers=http_headers,
|
|
477
|
-
security=self.sdk_configuration.security,
|
|
478
|
-
get_serialized_body=lambda: utils.serialize_request_body(
|
|
479
|
-
request,
|
|
480
|
-
False,
|
|
481
|
-
True,
|
|
482
|
-
"json",
|
|
483
|
-
Optional[operations.CreateCustomerRequestBody],
|
|
484
|
-
),
|
|
485
|
-
timeout_ms=timeout_ms,
|
|
486
|
-
)
|
|
487
|
-
|
|
488
|
-
if retries == UNSET:
|
|
489
|
-
if self.sdk_configuration.retry_config is not UNSET:
|
|
490
|
-
retries = self.sdk_configuration.retry_config
|
|
491
|
-
|
|
492
|
-
retry_config = None
|
|
493
|
-
if isinstance(retries, utils.RetryConfig):
|
|
494
|
-
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
495
|
-
|
|
496
|
-
http_res = await self.do_request_async(
|
|
497
|
-
hook_ctx=HookContext(
|
|
498
|
-
config=self.sdk_configuration,
|
|
499
|
-
base_url=base_url or "",
|
|
500
|
-
operation_id="createCustomer",
|
|
501
|
-
oauth2_scopes=[],
|
|
502
|
-
security_source=self.sdk_configuration.security,
|
|
503
|
-
),
|
|
504
|
-
request=req,
|
|
505
|
-
error_status_codes=[
|
|
506
|
-
"400",
|
|
507
|
-
"401",
|
|
508
|
-
"403",
|
|
509
|
-
"404",
|
|
510
|
-
"409",
|
|
511
|
-
"410",
|
|
512
|
-
"422",
|
|
513
|
-
"429",
|
|
514
|
-
"4XX",
|
|
515
|
-
"500",
|
|
516
|
-
"5XX",
|
|
517
|
-
],
|
|
518
|
-
retry_config=retry_config,
|
|
519
|
-
)
|
|
520
|
-
|
|
521
|
-
response_data: Any = None
|
|
522
|
-
if utils.match_response(http_res, "201", "application/json"):
|
|
523
|
-
return unmarshal_json_response(
|
|
524
|
-
Optional[operations.CreateCustomerResponseBody], http_res
|
|
231
|
+
List[operations.GetCustomersResponseBody], http_res
|
|
525
232
|
)
|
|
526
233
|
if utils.match_response(http_res, "400", "application/json"):
|
|
527
234
|
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
@@ -575,7 +282,7 @@ class Customers(BaseSDK):
|
|
|
575
282
|
server_url: Optional[str] = None,
|
|
576
283
|
timeout_ms: Optional[int] = None,
|
|
577
284
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
578
|
-
) ->
|
|
285
|
+
) -> operations.GetCustomerResponseBody:
|
|
579
286
|
r"""Retrieve a customer
|
|
580
287
|
|
|
581
288
|
Retrieve a customer by ID for the authenticated workspace.
|
|
@@ -629,7 +336,7 @@ class Customers(BaseSDK):
|
|
|
629
336
|
config=self.sdk_configuration,
|
|
630
337
|
base_url=base_url or "",
|
|
631
338
|
operation_id="getCustomer",
|
|
632
|
-
oauth2_scopes=
|
|
339
|
+
oauth2_scopes=None,
|
|
633
340
|
security_source=self.sdk_configuration.security,
|
|
634
341
|
),
|
|
635
342
|
request=req,
|
|
@@ -651,9 +358,7 @@ class Customers(BaseSDK):
|
|
|
651
358
|
|
|
652
359
|
response_data: Any = None
|
|
653
360
|
if utils.match_response(http_res, "200", "application/json"):
|
|
654
|
-
return unmarshal_json_response(
|
|
655
|
-
Optional[operations.GetCustomerResponseBody], http_res
|
|
656
|
-
)
|
|
361
|
+
return unmarshal_json_response(operations.GetCustomerResponseBody, http_res)
|
|
657
362
|
if utils.match_response(http_res, "400", "application/json"):
|
|
658
363
|
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
659
364
|
raise errors.BadRequest(response_data, http_res)
|
|
@@ -706,7 +411,7 @@ class Customers(BaseSDK):
|
|
|
706
411
|
server_url: Optional[str] = None,
|
|
707
412
|
timeout_ms: Optional[int] = None,
|
|
708
413
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
709
|
-
) ->
|
|
414
|
+
) -> operations.GetCustomerResponseBody:
|
|
710
415
|
r"""Retrieve a customer
|
|
711
416
|
|
|
712
417
|
Retrieve a customer by ID for the authenticated workspace.
|
|
@@ -760,7 +465,7 @@ class Customers(BaseSDK):
|
|
|
760
465
|
config=self.sdk_configuration,
|
|
761
466
|
base_url=base_url or "",
|
|
762
467
|
operation_id="getCustomer",
|
|
763
|
-
oauth2_scopes=
|
|
468
|
+
oauth2_scopes=None,
|
|
764
469
|
security_source=self.sdk_configuration.security,
|
|
765
470
|
),
|
|
766
471
|
request=req,
|
|
@@ -782,9 +487,7 @@ class Customers(BaseSDK):
|
|
|
782
487
|
|
|
783
488
|
response_data: Any = None
|
|
784
489
|
if utils.match_response(http_res, "200", "application/json"):
|
|
785
|
-
return unmarshal_json_response(
|
|
786
|
-
Optional[operations.GetCustomerResponseBody], http_res
|
|
787
|
-
)
|
|
490
|
+
return unmarshal_json_response(operations.GetCustomerResponseBody, http_res)
|
|
788
491
|
if utils.match_response(http_res, "400", "application/json"):
|
|
789
492
|
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
790
493
|
raise errors.BadRequest(response_data, http_res)
|
|
@@ -837,7 +540,7 @@ class Customers(BaseSDK):
|
|
|
837
540
|
server_url: Optional[str] = None,
|
|
838
541
|
timeout_ms: Optional[int] = None,
|
|
839
542
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
840
|
-
) ->
|
|
543
|
+
) -> operations.UpdateCustomerResponseBody:
|
|
841
544
|
r"""Update a customer
|
|
842
545
|
|
|
843
546
|
Update a customer for the authenticated workspace.
|
|
@@ -898,7 +601,7 @@ class Customers(BaseSDK):
|
|
|
898
601
|
config=self.sdk_configuration,
|
|
899
602
|
base_url=base_url or "",
|
|
900
603
|
operation_id="updateCustomer",
|
|
901
|
-
oauth2_scopes=
|
|
604
|
+
oauth2_scopes=None,
|
|
902
605
|
security_source=self.sdk_configuration.security,
|
|
903
606
|
),
|
|
904
607
|
request=req,
|
|
@@ -921,7 +624,7 @@ class Customers(BaseSDK):
|
|
|
921
624
|
response_data: Any = None
|
|
922
625
|
if utils.match_response(http_res, "200", "application/json"):
|
|
923
626
|
return unmarshal_json_response(
|
|
924
|
-
|
|
627
|
+
operations.UpdateCustomerResponseBody, http_res
|
|
925
628
|
)
|
|
926
629
|
if utils.match_response(http_res, "400", "application/json"):
|
|
927
630
|
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
@@ -975,7 +678,7 @@ class Customers(BaseSDK):
|
|
|
975
678
|
server_url: Optional[str] = None,
|
|
976
679
|
timeout_ms: Optional[int] = None,
|
|
977
680
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
978
|
-
) ->
|
|
681
|
+
) -> operations.UpdateCustomerResponseBody:
|
|
979
682
|
r"""Update a customer
|
|
980
683
|
|
|
981
684
|
Update a customer for the authenticated workspace.
|
|
@@ -1036,7 +739,7 @@ class Customers(BaseSDK):
|
|
|
1036
739
|
config=self.sdk_configuration,
|
|
1037
740
|
base_url=base_url or "",
|
|
1038
741
|
operation_id="updateCustomer",
|
|
1039
|
-
oauth2_scopes=
|
|
742
|
+
oauth2_scopes=None,
|
|
1040
743
|
security_source=self.sdk_configuration.security,
|
|
1041
744
|
),
|
|
1042
745
|
request=req,
|
|
@@ -1059,7 +762,7 @@ class Customers(BaseSDK):
|
|
|
1059
762
|
response_data: Any = None
|
|
1060
763
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1061
764
|
return unmarshal_json_response(
|
|
1062
|
-
|
|
765
|
+
operations.UpdateCustomerResponseBody, http_res
|
|
1063
766
|
)
|
|
1064
767
|
if utils.match_response(http_res, "400", "application/json"):
|
|
1065
768
|
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
@@ -1111,7 +814,7 @@ class Customers(BaseSDK):
|
|
|
1111
814
|
server_url: Optional[str] = None,
|
|
1112
815
|
timeout_ms: Optional[int] = None,
|
|
1113
816
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
1114
|
-
) ->
|
|
817
|
+
) -> operations.DeleteCustomerResponseBody:
|
|
1115
818
|
r"""Delete a customer
|
|
1116
819
|
|
|
1117
820
|
Delete a customer from a workspace.
|
|
@@ -1165,7 +868,7 @@ class Customers(BaseSDK):
|
|
|
1165
868
|
config=self.sdk_configuration,
|
|
1166
869
|
base_url=base_url or "",
|
|
1167
870
|
operation_id="deleteCustomer",
|
|
1168
|
-
oauth2_scopes=
|
|
871
|
+
oauth2_scopes=None,
|
|
1169
872
|
security_source=self.sdk_configuration.security,
|
|
1170
873
|
),
|
|
1171
874
|
request=req,
|
|
@@ -1188,7 +891,7 @@ class Customers(BaseSDK):
|
|
|
1188
891
|
response_data: Any = None
|
|
1189
892
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1190
893
|
return unmarshal_json_response(
|
|
1191
|
-
|
|
894
|
+
operations.DeleteCustomerResponseBody, http_res
|
|
1192
895
|
)
|
|
1193
896
|
if utils.match_response(http_res, "400", "application/json"):
|
|
1194
897
|
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|
|
@@ -1240,7 +943,7 @@ class Customers(BaseSDK):
|
|
|
1240
943
|
server_url: Optional[str] = None,
|
|
1241
944
|
timeout_ms: Optional[int] = None,
|
|
1242
945
|
http_headers: Optional[Mapping[str, str]] = None,
|
|
1243
|
-
) ->
|
|
946
|
+
) -> operations.DeleteCustomerResponseBody:
|
|
1244
947
|
r"""Delete a customer
|
|
1245
948
|
|
|
1246
949
|
Delete a customer from a workspace.
|
|
@@ -1294,7 +997,7 @@ class Customers(BaseSDK):
|
|
|
1294
997
|
config=self.sdk_configuration,
|
|
1295
998
|
base_url=base_url or "",
|
|
1296
999
|
operation_id="deleteCustomer",
|
|
1297
|
-
oauth2_scopes=
|
|
1000
|
+
oauth2_scopes=None,
|
|
1298
1001
|
security_source=self.sdk_configuration.security,
|
|
1299
1002
|
),
|
|
1300
1003
|
request=req,
|
|
@@ -1317,7 +1020,7 @@ class Customers(BaseSDK):
|
|
|
1317
1020
|
response_data: Any = None
|
|
1318
1021
|
if utils.match_response(http_res, "200", "application/json"):
|
|
1319
1022
|
return unmarshal_json_response(
|
|
1320
|
-
|
|
1023
|
+
operations.DeleteCustomerResponseBody, http_res
|
|
1321
1024
|
)
|
|
1322
1025
|
if utils.match_response(http_res, "400", "application/json"):
|
|
1323
1026
|
response_data = unmarshal_json_response(errors.BadRequestData, http_res)
|