"""Constants for the Garanti BBVA Switch (Card Storage) API.

The Switch API is a separate JSON-based system from the traditional
XML-based VPServlet API. It provides card tokenization and token-based
payment capabilities for recurring/subscription billing.

Reference:
    https://dev.garantibbva.com.tr/kart-saklama-api-istegi-ile-token-alma
"""

from typing import Dict

SWITCH_ENDPOINTS: Dict[str, str] = {
    "TEST": "https://gbtaksimtunel-integration.garanti.com.tr",
    "PROD": "https://kartsaklamabackend.garanti.com.tr",
}
"""Base URL mapping for the Switch API by environment mode.

- ``"TEST"``: Sandbox endpoint for development and integration testing.
  No real financial transactions are processed.
- ``"PROD"``: Live production endpoint for real tokenization and payments.
"""

TOKEN_GENERATE_PATH: str = "/api/token/generate"
"""API path for generating a new card token.

Accepts a full card number (or first6+last4 for Garanti cards) and
returns a unique token ID that can be used for future payments.
"""

TOKEN_INQUIRY_PATH: str = "/api/token/inquiry"
"""API path for querying a previously generated token.

Requires the ``originalRequestId`` from the token generation request.
Returns the token ID, masked card number, and bank information.
"""

TOKEN_DELETE_PATH: str = "/api/token/removetoken"
"""API path for deleting a stored token.

Once deleted, the token can no longer be used for payments.
The card data associated with the token is removed from Garanti's servers.
"""

TOKEN_PAYMENT_PATH: str = "/api/payment/token/auth"
"""API path for processing a sale using a stored token.

This is the endpoint used for recurring/subscription payments.
Instead of sending raw card data, only the token ID is required.
"""
