public static function create(string $token, array $customHeaders = []): BunqResponseTokenQrRequestIdeal
    {
        $apiClient = new ApiClient(static::getApiContext());
        $responseRaw = $apiClient->post(
            vsprintf(
                self::ENDPOINT_URL_CREATE,
                [static::determineUserId()]
            ),
            [self::FIELD_TOKEN => $token],
            $customHeaders
        );

        return BunqResponseTokenQrRequestIdeal::castFromBunqResponse(
            static::fromJson($responseRaw, self::OBJECT_TYPE_POST)
        );
    }
public static function create(string $token, array $customHeaders = []): BunqResponseTokenQrRequestIdeal
    {
        $apiClient = new ApiClient(static::getApiContext());
        $responseRaw = $apiClient->post(
            vsprintf(
                self::ENDPOINT_URL_CREATE,
                [static::determineUserId()]
            ),
            [self::FIELD_TOKEN => $token],
            $customHeaders
        );

        return BunqResponseTokenQrRequestIdeal::castFromBunqResponse(
            static::fromJson($responseRaw, self::OBJECT_TYPE_POST)
        );
    }
public static function create ( string $ token , array $ customHeaders = [ ] ) : BunqResponseTokenQrRequestIdeal { $ apiClient = new ApiClient ( static :: getApiContext ( ) ) ; $ responseRaw = $ apiClient -> post ( vsprintf ( self :: ENDPOINT_URL_CREATE , [ static :: determineUserId ( ) ] ) , [ self :: FIELD_TOKEN => $ token ] , $ customHeaders ) ; return BunqResponseTokenQrRequestIdeal :: castFromBunqResponse ( static :: fromJson ( $ responseRaw , self :: OBJECT_TYPE_POST ) ) ; }
Create a request from an ideal transaction.

@param string $token The token passed from a site or read from a QR code.
@param string[] $customHeaders

@return BunqResponseTokenQrRequestIdeal
Create a request from an ideal transaction .