66import json
77import base64
88import hashlib
9+ import typing_extensions
910from typing import Any , Union , cast
1011from datetime import datetime , timezone , timedelta
1112from typing_extensions import Literal
@@ -675,6 +676,7 @@ def convert_physical(
675676 cast_to = Card ,
676677 )
677678
679+ @typing_extensions .deprecated ("deprecated" )
678680 def embed (
679681 self ,
680682 * ,
@@ -688,6 +690,9 @@ def embed(
688690 timeout : float | httpx .Timeout | None | NotGiven = not_given ,
689691 ) -> str :
690692 """
693+ **Deprecated.** Use the modern embedded card flow instead: create a session with
694+ `POST /v1/cards/{card_token}/embed` and render it via `GET /v1/embed`.
695+
691696 Handling full card PANs and CVV codes requires that you comply with the Payment
692697 Card Industry Data Security Standards (PCI DSS). Some clients choose to reduce
693698 their compliance obligations by leveraging our embedded card UI solution
@@ -1903,6 +1908,7 @@ async def convert_physical(
19031908 cast_to = Card ,
19041909 )
19051910
1911+ @typing_extensions .deprecated ("deprecated" )
19061912 async def embed (
19071913 self ,
19081914 * ,
@@ -1916,6 +1922,9 @@ async def embed(
19161922 timeout : float | httpx .Timeout | None | NotGiven = not_given ,
19171923 ) -> str :
19181924 """
1925+ **Deprecated.** Use the modern embedded card flow instead: create a session with
1926+ `POST /v1/cards/{card_token}/embed` and render it via `GET /v1/embed`.
1927+
19191928 Handling full card PANs and CVV codes requires that you comply with the Payment
19201929 Card Industry Data Security Standards (PCI DSS). Some clients choose to reduce
19211930 their compliance obligations by leveraging our embedded card UI solution
@@ -2539,8 +2548,10 @@ def __init__(self, cards: Cards) -> None:
25392548 self .convert_physical = _legacy_response .to_raw_response_wrapper (
25402549 cards .convert_physical ,
25412550 )
2542- self .embed = _legacy_response .to_raw_response_wrapper (
2543- cards .embed ,
2551+ self .embed = ( # pyright: ignore[reportDeprecated]
2552+ _legacy_response .to_raw_response_wrapper (
2553+ cards .embed , # pyright: ignore[reportDeprecated],
2554+ )
25442555 )
25452556 self .provision = _legacy_response .to_raw_response_wrapper (
25462557 cards .provision ,
@@ -2592,8 +2603,10 @@ def __init__(self, cards: AsyncCards) -> None:
25922603 self .convert_physical = _legacy_response .async_to_raw_response_wrapper (
25932604 cards .convert_physical ,
25942605 )
2595- self .embed = _legacy_response .async_to_raw_response_wrapper (
2596- cards .embed ,
2606+ self .embed = ( # pyright: ignore[reportDeprecated]
2607+ _legacy_response .async_to_raw_response_wrapper (
2608+ cards .embed , # pyright: ignore[reportDeprecated],
2609+ )
25972610 )
25982611 self .provision = _legacy_response .async_to_raw_response_wrapper (
25992612 cards .provision ,
@@ -2645,8 +2658,10 @@ def __init__(self, cards: Cards) -> None:
26452658 self .convert_physical = to_streamed_response_wrapper (
26462659 cards .convert_physical ,
26472660 )
2648- self .embed = to_streamed_response_wrapper (
2649- cards .embed ,
2661+ self .embed = ( # pyright: ignore[reportDeprecated]
2662+ to_streamed_response_wrapper (
2663+ cards .embed , # pyright: ignore[reportDeprecated],
2664+ )
26502665 )
26512666 self .provision = to_streamed_response_wrapper (
26522667 cards .provision ,
@@ -2698,8 +2713,10 @@ def __init__(self, cards: AsyncCards) -> None:
26982713 self .convert_physical = async_to_streamed_response_wrapper (
26992714 cards .convert_physical ,
27002715 )
2701- self .embed = async_to_streamed_response_wrapper (
2702- cards .embed ,
2716+ self .embed = ( # pyright: ignore[reportDeprecated]
2717+ async_to_streamed_response_wrapper (
2718+ cards .embed , # pyright: ignore[reportDeprecated],
2719+ )
27032720 )
27042721 self .provision = async_to_streamed_response_wrapper (
27052722 cards .provision ,
0 commit comments