|
15 | 15 | brand_styleguide_params, |
16 | 16 | brand_retrieve_naics_params, |
17 | 17 | brand_retrieve_by_name_params, |
| 18 | + brand_retrieve_by_email_params, |
18 | 19 | brand_retrieve_by_ticker_params, |
19 | 20 | brand_retrieve_simplified_params, |
20 | 21 | brand_identify_from_transaction_params, |
|
37 | 38 | from ..types.brand_styleguide_response import BrandStyleguideResponse |
38 | 39 | from ..types.brand_retrieve_naics_response import BrandRetrieveNaicsResponse |
39 | 40 | from ..types.brand_retrieve_by_name_response import BrandRetrieveByNameResponse |
| 41 | +from ..types.brand_retrieve_by_email_response import BrandRetrieveByEmailResponse |
40 | 42 | from ..types.brand_retrieve_by_ticker_response import BrandRetrieveByTickerResponse |
41 | 43 | from ..types.brand_retrieve_simplified_response import BrandRetrieveSimplifiedResponse |
42 | 44 | from ..types.brand_identify_from_transaction_response import BrandIdentifyFromTransactionResponse |
@@ -396,6 +398,123 @@ def prefetch( |
396 | 398 | cast_to=BrandPrefetchResponse, |
397 | 399 | ) |
398 | 400 |
|
| 401 | + def retrieve_by_email( |
| 402 | + self, |
| 403 | + *, |
| 404 | + email: str, |
| 405 | + force_language: Literal[ |
| 406 | + "albanian", |
| 407 | + "arabic", |
| 408 | + "azeri", |
| 409 | + "bengali", |
| 410 | + "bulgarian", |
| 411 | + "cebuano", |
| 412 | + "croatian", |
| 413 | + "czech", |
| 414 | + "danish", |
| 415 | + "dutch", |
| 416 | + "english", |
| 417 | + "estonian", |
| 418 | + "farsi", |
| 419 | + "finnish", |
| 420 | + "french", |
| 421 | + "german", |
| 422 | + "hausa", |
| 423 | + "hawaiian", |
| 424 | + "hindi", |
| 425 | + "hungarian", |
| 426 | + "icelandic", |
| 427 | + "indonesian", |
| 428 | + "italian", |
| 429 | + "kazakh", |
| 430 | + "kyrgyz", |
| 431 | + "latin", |
| 432 | + "latvian", |
| 433 | + "lithuanian", |
| 434 | + "macedonian", |
| 435 | + "mongolian", |
| 436 | + "nepali", |
| 437 | + "norwegian", |
| 438 | + "pashto", |
| 439 | + "pidgin", |
| 440 | + "polish", |
| 441 | + "portuguese", |
| 442 | + "romanian", |
| 443 | + "russian", |
| 444 | + "serbian", |
| 445 | + "slovak", |
| 446 | + "slovene", |
| 447 | + "somali", |
| 448 | + "spanish", |
| 449 | + "swahili", |
| 450 | + "swedish", |
| 451 | + "tagalog", |
| 452 | + "turkish", |
| 453 | + "ukrainian", |
| 454 | + "urdu", |
| 455 | + "uzbek", |
| 456 | + "vietnamese", |
| 457 | + "welsh", |
| 458 | + ] |
| 459 | + | Omit = omit, |
| 460 | + max_speed: bool | Omit = omit, |
| 461 | + timeout_ms: int | Omit = omit, |
| 462 | + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. |
| 463 | + # The extra values given here take precedence over values defined on the client or passed to this method. |
| 464 | + extra_headers: Headers | None = None, |
| 465 | + extra_query: Query | None = None, |
| 466 | + extra_body: Body | None = None, |
| 467 | + timeout: float | httpx.Timeout | None | NotGiven = not_given, |
| 468 | + ) -> BrandRetrieveByEmailResponse: |
| 469 | + """ |
| 470 | + Retrieve brand information using an email address while detecting disposable and |
| 471 | + free email addresses. This endpoint extracts the domain from the email address |
| 472 | + and returns brand data for that domain. Disposable and free email addresses |
| 473 | + (like gmail.com, yahoo.com) will throw a 422 error. |
| 474 | +
|
| 475 | + Args: |
| 476 | + email: Email address to retrieve brand data for (e.g., 'contact@example.com'). The |
| 477 | + domain will be extracted from the email. Free email providers (gmail.com, |
| 478 | + yahoo.com, etc.) and disposable email addresses are not allowed. |
| 479 | +
|
| 480 | + force_language: Optional parameter to force the language of the retrieved brand data. |
| 481 | +
|
| 482 | + max_speed: Optional parameter to optimize the API call for maximum speed. When set to true, |
| 483 | + the API will skip time-consuming operations for faster response at the cost of |
| 484 | + less comprehensive data. |
| 485 | +
|
| 486 | + timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer |
| 487 | + than this value, it will be aborted with a 408 status code. Maximum allowed |
| 488 | + value is 300000ms (5 minutes). |
| 489 | +
|
| 490 | + extra_headers: Send extra headers |
| 491 | +
|
| 492 | + extra_query: Add additional query parameters to the request |
| 493 | +
|
| 494 | + extra_body: Add additional JSON properties to the request |
| 495 | +
|
| 496 | + timeout: Override the client-level default timeout for this request, in seconds |
| 497 | + """ |
| 498 | + return self._get( |
| 499 | + "/brand/retrieve-by-email", |
| 500 | + options=make_request_options( |
| 501 | + extra_headers=extra_headers, |
| 502 | + extra_query=extra_query, |
| 503 | + extra_body=extra_body, |
| 504 | + timeout=timeout, |
| 505 | + query=maybe_transform( |
| 506 | + { |
| 507 | + "email": email, |
| 508 | + "force_language": force_language, |
| 509 | + "max_speed": max_speed, |
| 510 | + "timeout_ms": timeout_ms, |
| 511 | + }, |
| 512 | + brand_retrieve_by_email_params.BrandRetrieveByEmailParams, |
| 513 | + ), |
| 514 | + ), |
| 515 | + cast_to=BrandRetrieveByEmailResponse, |
| 516 | + ) |
| 517 | + |
399 | 518 | def retrieve_by_name( |
400 | 519 | self, |
401 | 520 | *, |
@@ -1281,6 +1400,123 @@ async def prefetch( |
1281 | 1400 | cast_to=BrandPrefetchResponse, |
1282 | 1401 | ) |
1283 | 1402 |
|
| 1403 | + async def retrieve_by_email( |
| 1404 | + self, |
| 1405 | + *, |
| 1406 | + email: str, |
| 1407 | + force_language: Literal[ |
| 1408 | + "albanian", |
| 1409 | + "arabic", |
| 1410 | + "azeri", |
| 1411 | + "bengali", |
| 1412 | + "bulgarian", |
| 1413 | + "cebuano", |
| 1414 | + "croatian", |
| 1415 | + "czech", |
| 1416 | + "danish", |
| 1417 | + "dutch", |
| 1418 | + "english", |
| 1419 | + "estonian", |
| 1420 | + "farsi", |
| 1421 | + "finnish", |
| 1422 | + "french", |
| 1423 | + "german", |
| 1424 | + "hausa", |
| 1425 | + "hawaiian", |
| 1426 | + "hindi", |
| 1427 | + "hungarian", |
| 1428 | + "icelandic", |
| 1429 | + "indonesian", |
| 1430 | + "italian", |
| 1431 | + "kazakh", |
| 1432 | + "kyrgyz", |
| 1433 | + "latin", |
| 1434 | + "latvian", |
| 1435 | + "lithuanian", |
| 1436 | + "macedonian", |
| 1437 | + "mongolian", |
| 1438 | + "nepali", |
| 1439 | + "norwegian", |
| 1440 | + "pashto", |
| 1441 | + "pidgin", |
| 1442 | + "polish", |
| 1443 | + "portuguese", |
| 1444 | + "romanian", |
| 1445 | + "russian", |
| 1446 | + "serbian", |
| 1447 | + "slovak", |
| 1448 | + "slovene", |
| 1449 | + "somali", |
| 1450 | + "spanish", |
| 1451 | + "swahili", |
| 1452 | + "swedish", |
| 1453 | + "tagalog", |
| 1454 | + "turkish", |
| 1455 | + "ukrainian", |
| 1456 | + "urdu", |
| 1457 | + "uzbek", |
| 1458 | + "vietnamese", |
| 1459 | + "welsh", |
| 1460 | + ] |
| 1461 | + | Omit = omit, |
| 1462 | + max_speed: bool | Omit = omit, |
| 1463 | + timeout_ms: int | Omit = omit, |
| 1464 | + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. |
| 1465 | + # The extra values given here take precedence over values defined on the client or passed to this method. |
| 1466 | + extra_headers: Headers | None = None, |
| 1467 | + extra_query: Query | None = None, |
| 1468 | + extra_body: Body | None = None, |
| 1469 | + timeout: float | httpx.Timeout | None | NotGiven = not_given, |
| 1470 | + ) -> BrandRetrieveByEmailResponse: |
| 1471 | + """ |
| 1472 | + Retrieve brand information using an email address while detecting disposable and |
| 1473 | + free email addresses. This endpoint extracts the domain from the email address |
| 1474 | + and returns brand data for that domain. Disposable and free email addresses |
| 1475 | + (like gmail.com, yahoo.com) will throw a 422 error. |
| 1476 | +
|
| 1477 | + Args: |
| 1478 | + email: Email address to retrieve brand data for (e.g., 'contact@example.com'). The |
| 1479 | + domain will be extracted from the email. Free email providers (gmail.com, |
| 1480 | + yahoo.com, etc.) and disposable email addresses are not allowed. |
| 1481 | +
|
| 1482 | + force_language: Optional parameter to force the language of the retrieved brand data. |
| 1483 | +
|
| 1484 | + max_speed: Optional parameter to optimize the API call for maximum speed. When set to true, |
| 1485 | + the API will skip time-consuming operations for faster response at the cost of |
| 1486 | + less comprehensive data. |
| 1487 | +
|
| 1488 | + timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer |
| 1489 | + than this value, it will be aborted with a 408 status code. Maximum allowed |
| 1490 | + value is 300000ms (5 minutes). |
| 1491 | +
|
| 1492 | + extra_headers: Send extra headers |
| 1493 | +
|
| 1494 | + extra_query: Add additional query parameters to the request |
| 1495 | +
|
| 1496 | + extra_body: Add additional JSON properties to the request |
| 1497 | +
|
| 1498 | + timeout: Override the client-level default timeout for this request, in seconds |
| 1499 | + """ |
| 1500 | + return await self._get( |
| 1501 | + "/brand/retrieve-by-email", |
| 1502 | + options=make_request_options( |
| 1503 | + extra_headers=extra_headers, |
| 1504 | + extra_query=extra_query, |
| 1505 | + extra_body=extra_body, |
| 1506 | + timeout=timeout, |
| 1507 | + query=await async_maybe_transform( |
| 1508 | + { |
| 1509 | + "email": email, |
| 1510 | + "force_language": force_language, |
| 1511 | + "max_speed": max_speed, |
| 1512 | + "timeout_ms": timeout_ms, |
| 1513 | + }, |
| 1514 | + brand_retrieve_by_email_params.BrandRetrieveByEmailParams, |
| 1515 | + ), |
| 1516 | + ), |
| 1517 | + cast_to=BrandRetrieveByEmailResponse, |
| 1518 | + ) |
| 1519 | + |
1284 | 1520 | async def retrieve_by_name( |
1285 | 1521 | self, |
1286 | 1522 | *, |
@@ -1830,6 +2066,9 @@ def __init__(self, brand: BrandResource) -> None: |
1830 | 2066 | self.prefetch = to_raw_response_wrapper( |
1831 | 2067 | brand.prefetch, |
1832 | 2068 | ) |
| 2069 | + self.retrieve_by_email = to_raw_response_wrapper( |
| 2070 | + brand.retrieve_by_email, |
| 2071 | + ) |
1833 | 2072 | self.retrieve_by_name = to_raw_response_wrapper( |
1834 | 2073 | brand.retrieve_by_name, |
1835 | 2074 | ) |
@@ -1866,6 +2105,9 @@ def __init__(self, brand: AsyncBrandResource) -> None: |
1866 | 2105 | self.prefetch = async_to_raw_response_wrapper( |
1867 | 2106 | brand.prefetch, |
1868 | 2107 | ) |
| 2108 | + self.retrieve_by_email = async_to_raw_response_wrapper( |
| 2109 | + brand.retrieve_by_email, |
| 2110 | + ) |
1869 | 2111 | self.retrieve_by_name = async_to_raw_response_wrapper( |
1870 | 2112 | brand.retrieve_by_name, |
1871 | 2113 | ) |
@@ -1902,6 +2144,9 @@ def __init__(self, brand: BrandResource) -> None: |
1902 | 2144 | self.prefetch = to_streamed_response_wrapper( |
1903 | 2145 | brand.prefetch, |
1904 | 2146 | ) |
| 2147 | + self.retrieve_by_email = to_streamed_response_wrapper( |
| 2148 | + brand.retrieve_by_email, |
| 2149 | + ) |
1905 | 2150 | self.retrieve_by_name = to_streamed_response_wrapper( |
1906 | 2151 | brand.retrieve_by_name, |
1907 | 2152 | ) |
@@ -1938,6 +2183,9 @@ def __init__(self, brand: AsyncBrandResource) -> None: |
1938 | 2183 | self.prefetch = async_to_streamed_response_wrapper( |
1939 | 2184 | brand.prefetch, |
1940 | 2185 | ) |
| 2186 | + self.retrieve_by_email = async_to_streamed_response_wrapper( |
| 2187 | + brand.retrieve_by_email, |
| 2188 | + ) |
1941 | 2189 | self.retrieve_by_name = async_to_streamed_response_wrapper( |
1942 | 2190 | brand.retrieve_by_name, |
1943 | 2191 | ) |
|
0 commit comments