# coding: utf-8

"""
    Marqeta Core API

    Simplified management of your payment programs  # noqa: E501

    The version of the OpenAPI document: 3.0.0
    Contact: dev@swadesh.co
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""


import re  # noqa: F401

from pydantic import validate_arguments, ValidationError
from typing_extensions import Annotated

from pydantic import Field, StrictInt, StrictStr

from typing import Optional

from marqeta_client.models.digital_wallet_token import DigitalWalletToken
from marqeta_client.models.digital_wallet_token_list_response import DigitalWalletTokenListResponse

from marqeta_client.api_client import ApiClient
from marqeta_client.exceptions import (  # noqa: F401
    ApiTypeError,
    ApiValueError
)


class DigitalWalletTokensApi(object):
    """NOTE: This class is auto generated by OpenAPI Generator
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient.get_default()
        self.api_client = api_client

    @validate_arguments
    def get_digitalwallettokens(self, count : Annotated[Optional[StrictInt], Field(description="Number of digital wallet tokens to retrieve")] = None, start_index : Annotated[Optional[StrictInt], Field(description="Start index")] = None, fields : Annotated[Optional[StrictStr], Field(description="Comma-delimited list of fields to return (e.g. field_1,field_2,..). Leave blank to return all fields.")] = None, sort_by : Annotated[Optional[StrictStr], Field(description="Sort order")] = None, start_date : Annotated[Optional[StrictStr], Field(description="Start date (yyyy-MM-dd)")] = None, end_date : Annotated[Optional[StrictStr], Field(description="End date (yyyy-MM-dd)")] = None, pan_reference_id : Annotated[Optional[StrictStr], Field(description="PAN reference ID")] = None, token_reference_id : Annotated[Optional[StrictStr], Field(description="Token reference ID")] = None, correlation_id : Annotated[Optional[StrictStr], Field(description="Correlation ID")] = None, token_type : Annotated[Optional[StrictStr], Field(description="Comma-delimited list of digital wallet token types to display e.g. DEVICE_SECURE_ELEMENT | MERCHANT_CARD_ON_FILE | DEVICE_CLOUD_BASED | ECOMMERCE_DIGITAL_WALLET | PSEUDO_ACCOUNT")] = None, token_requestor_name : Annotated[Optional[StrictStr], Field(description="Comma-delimited list of digital wallet token wallet providers to display e.g. APPLE_PAY | ANDROID_PAY| SAMSUNG_PAY | MICROSOFT_PAY | VISA_CHECKOUT | FACEBOOK | NETFLIX | UNKNOWN")] = None, state : Annotated[Optional[StrictStr], Field(description="Comma-delimited list of digital wallet token states to display e.g. REQUESTED | REQUEST_DECLINED | TERMINATED | SUSPENDED | ACTIVE")] = None, embed : Annotated[Optional[StrictStr], Field(description="Embed")] = None, **kwargs) -> DigitalWalletTokenListResponse:  # noqa: E501
        """Returns digital wallet tokens  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.get_digitalwallettokens(count, start_index, fields, sort_by, start_date, end_date, pan_reference_id, token_reference_id, correlation_id, token_type, token_requestor_name, state, embed, async_req=True)
        >>> result = thread.get()

        :param count: Number of digital wallet tokens to retrieve
        :type count: int
        :param start_index: Start index
        :type start_index: int
        :param fields: Comma-delimited list of fields to return (e.g. field_1,field_2,..). Leave blank to return all fields.
        :type fields: str
        :param sort_by: Sort order
        :type sort_by: str
        :param start_date: Start date (yyyy-MM-dd)
        :type start_date: str
        :param end_date: End date (yyyy-MM-dd)
        :type end_date: str
        :param pan_reference_id: PAN reference ID
        :type pan_reference_id: str
        :param token_reference_id: Token reference ID
        :type token_reference_id: str
        :param correlation_id: Correlation ID
        :type correlation_id: str
        :param token_type: Comma-delimited list of digital wallet token types to display e.g. DEVICE_SECURE_ELEMENT | MERCHANT_CARD_ON_FILE | DEVICE_CLOUD_BASED | ECOMMERCE_DIGITAL_WALLET | PSEUDO_ACCOUNT
        :type token_type: str
        :param token_requestor_name: Comma-delimited list of digital wallet token wallet providers to display e.g. APPLE_PAY | ANDROID_PAY| SAMSUNG_PAY | MICROSOFT_PAY | VISA_CHECKOUT | FACEBOOK | NETFLIX | UNKNOWN
        :type token_requestor_name: str
        :param state: Comma-delimited list of digital wallet token states to display e.g. REQUESTED | REQUEST_DECLINED | TERMINATED | SUSPENDED | ACTIVE
        :type state: str
        :param embed: Embed
        :type embed: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: DigitalWalletTokenListResponse
        """
        kwargs['_return_http_data_only'] = True
        return self.get_digitalwallettokens_with_http_info(count, start_index, fields, sort_by, start_date, end_date, pan_reference_id, token_reference_id, correlation_id, token_type, token_requestor_name, state, embed, **kwargs)  # noqa: E501

    @validate_arguments
    def get_digitalwallettokens_with_http_info(self, count : Annotated[Optional[StrictInt], Field(description="Number of digital wallet tokens to retrieve")] = None, start_index : Annotated[Optional[StrictInt], Field(description="Start index")] = None, fields : Annotated[Optional[StrictStr], Field(description="Comma-delimited list of fields to return (e.g. field_1,field_2,..). Leave blank to return all fields.")] = None, sort_by : Annotated[Optional[StrictStr], Field(description="Sort order")] = None, start_date : Annotated[Optional[StrictStr], Field(description="Start date (yyyy-MM-dd)")] = None, end_date : Annotated[Optional[StrictStr], Field(description="End date (yyyy-MM-dd)")] = None, pan_reference_id : Annotated[Optional[StrictStr], Field(description="PAN reference ID")] = None, token_reference_id : Annotated[Optional[StrictStr], Field(description="Token reference ID")] = None, correlation_id : Annotated[Optional[StrictStr], Field(description="Correlation ID")] = None, token_type : Annotated[Optional[StrictStr], Field(description="Comma-delimited list of digital wallet token types to display e.g. DEVICE_SECURE_ELEMENT | MERCHANT_CARD_ON_FILE | DEVICE_CLOUD_BASED | ECOMMERCE_DIGITAL_WALLET | PSEUDO_ACCOUNT")] = None, token_requestor_name : Annotated[Optional[StrictStr], Field(description="Comma-delimited list of digital wallet token wallet providers to display e.g. APPLE_PAY | ANDROID_PAY| SAMSUNG_PAY | MICROSOFT_PAY | VISA_CHECKOUT | FACEBOOK | NETFLIX | UNKNOWN")] = None, state : Annotated[Optional[StrictStr], Field(description="Comma-delimited list of digital wallet token states to display e.g. REQUESTED | REQUEST_DECLINED | TERMINATED | SUSPENDED | ACTIVE")] = None, embed : Annotated[Optional[StrictStr], Field(description="Embed")] = None, **kwargs):  # noqa: E501
        """Returns digital wallet tokens  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.get_digitalwallettokens_with_http_info(count, start_index, fields, sort_by, start_date, end_date, pan_reference_id, token_reference_id, correlation_id, token_type, token_requestor_name, state, embed, async_req=True)
        >>> result = thread.get()

        :param count: Number of digital wallet tokens to retrieve
        :type count: int
        :param start_index: Start index
        :type start_index: int
        :param fields: Comma-delimited list of fields to return (e.g. field_1,field_2,..). Leave blank to return all fields.
        :type fields: str
        :param sort_by: Sort order
        :type sort_by: str
        :param start_date: Start date (yyyy-MM-dd)
        :type start_date: str
        :param end_date: End date (yyyy-MM-dd)
        :type end_date: str
        :param pan_reference_id: PAN reference ID
        :type pan_reference_id: str
        :param token_reference_id: Token reference ID
        :type token_reference_id: str
        :param correlation_id: Correlation ID
        :type correlation_id: str
        :param token_type: Comma-delimited list of digital wallet token types to display e.g. DEVICE_SECURE_ELEMENT | MERCHANT_CARD_ON_FILE | DEVICE_CLOUD_BASED | ECOMMERCE_DIGITAL_WALLET | PSEUDO_ACCOUNT
        :type token_type: str
        :param token_requestor_name: Comma-delimited list of digital wallet token wallet providers to display e.g. APPLE_PAY | ANDROID_PAY| SAMSUNG_PAY | MICROSOFT_PAY | VISA_CHECKOUT | FACEBOOK | NETFLIX | UNKNOWN
        :type token_requestor_name: str
        :param state: Comma-delimited list of digital wallet token states to display e.g. REQUESTED | REQUEST_DECLINED | TERMINATED | SUSPENDED | ACTIVE
        :type state: str
        :param embed: Embed
        :type embed: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: response data without head status code
                                       and headers
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(DigitalWalletTokenListResponse, status_code(int), headers(HTTPHeaderDict))
        """

        _params = locals()

        _all_params = [
            'count',
            'start_index',
            'fields',
            'sort_by',
            'start_date',
            'end_date',
            'pan_reference_id',
            'token_reference_id',
            'correlation_id',
            'token_type',
            'token_requestor_name',
            'state',
            'embed'
        ]
        _all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout',
                '_request_auth',
                '_content_type',
                '_headers'
            ]
        )

        # validate the arguments
        for _key, _val in _params['kwargs'].items():
            if _key not in _all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_digitalwallettokens" % _key
                )
            _params[_key] = _val
        del _params['kwargs']

        _collection_formats = {}

        # process the path parameters
        _path_params = {}

        # process the query parameters
        _query_params = []
        if _params.get('count') is not None:  # noqa: E501
            _query_params.append(('count', _params['count']))

        if _params.get('start_index') is not None:  # noqa: E501
            _query_params.append(('start_index', _params['start_index']))

        if _params.get('fields') is not None:  # noqa: E501
            _query_params.append(('fields', _params['fields']))

        if _params.get('sort_by') is not None:  # noqa: E501
            _query_params.append(('sort_by', _params['sort_by']))

        if _params.get('start_date') is not None:  # noqa: E501
            _query_params.append(('start_date', _params['start_date']))

        if _params.get('end_date') is not None:  # noqa: E501
            _query_params.append(('end_date', _params['end_date']))

        if _params.get('pan_reference_id') is not None:  # noqa: E501
            _query_params.append(('pan_reference_id', _params['pan_reference_id']))

        if _params.get('token_reference_id') is not None:  # noqa: E501
            _query_params.append(('token_reference_id', _params['token_reference_id']))

        if _params.get('correlation_id') is not None:  # noqa: E501
            _query_params.append(('correlation_id', _params['correlation_id']))

        if _params.get('token_type') is not None:  # noqa: E501
            _query_params.append(('token_type', _params['token_type']))

        if _params.get('token_requestor_name') is not None:  # noqa: E501
            _query_params.append(('token_requestor_name', _params['token_requestor_name']))

        if _params.get('state') is not None:  # noqa: E501
            _query_params.append(('state', _params['state']))

        if _params.get('embed') is not None:  # noqa: E501
            _query_params.append(('embed', _params['embed'].value))

        # process the header parameters
        _header_params = dict(_params.get('_headers', {}))
        # process the form parameters
        _form_params = []
        _files = {}
        # process the body parameter
        _body_params = None
        # set the HTTP header `Accept`
        _header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # authentication setting
        _auth_settings = []  # noqa: E501

        _response_types_map = {
            '200': "DigitalWalletTokenListResponse",
            '400': None,
            '500': None,
        }

        return self.api_client.call_api(
            '/digitalwallettokens', 'GET',
            _path_params,
            _query_params,
            _header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            response_types_map=_response_types_map,
            auth_settings=_auth_settings,
            async_req=_params.get('async_req'),
            _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=_params.get('_preload_content', True),
            _request_timeout=_params.get('_request_timeout'),
            collection_formats=_collection_formats,
            _request_auth=_params.get('_request_auth'))

    @validate_arguments
    def get_digitalwallettokens_card_cardtoken(self, card_token : Annotated[StrictStr, Field(..., description="Card token")], count : Annotated[Optional[StrictInt], Field(description="Number of items to retrieve")] = None, start_index : Annotated[Optional[StrictInt], Field(description="Start index")] = None, sort_by : Annotated[Optional[StrictStr], Field(description="Sort order")] = None, **kwargs) -> DigitalWalletTokenListResponse:  # noqa: E501
        """Returns a list of digital wallet tokens for the specified card  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.get_digitalwallettokens_card_cardtoken(card_token, count, start_index, sort_by, async_req=True)
        >>> result = thread.get()

        :param card_token: Card token (required)
        :type card_token: str
        :param count: Number of items to retrieve
        :type count: int
        :param start_index: Start index
        :type start_index: int
        :param sort_by: Sort order
        :type sort_by: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: DigitalWalletTokenListResponse
        """
        kwargs['_return_http_data_only'] = True
        return self.get_digitalwallettokens_card_cardtoken_with_http_info(card_token, count, start_index, sort_by, **kwargs)  # noqa: E501

    @validate_arguments
    def get_digitalwallettokens_card_cardtoken_with_http_info(self, card_token : Annotated[StrictStr, Field(..., description="Card token")], count : Annotated[Optional[StrictInt], Field(description="Number of items to retrieve")] = None, start_index : Annotated[Optional[StrictInt], Field(description="Start index")] = None, sort_by : Annotated[Optional[StrictStr], Field(description="Sort order")] = None, **kwargs):  # noqa: E501
        """Returns a list of digital wallet tokens for the specified card  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.get_digitalwallettokens_card_cardtoken_with_http_info(card_token, count, start_index, sort_by, async_req=True)
        >>> result = thread.get()

        :param card_token: Card token (required)
        :type card_token: str
        :param count: Number of items to retrieve
        :type count: int
        :param start_index: Start index
        :type start_index: int
        :param sort_by: Sort order
        :type sort_by: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: response data without head status code
                                       and headers
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(DigitalWalletTokenListResponse, status_code(int), headers(HTTPHeaderDict))
        """

        _params = locals()

        _all_params = [
            'card_token',
            'count',
            'start_index',
            'sort_by'
        ]
        _all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout',
                '_request_auth',
                '_content_type',
                '_headers'
            ]
        )

        # validate the arguments
        for _key, _val in _params['kwargs'].items():
            if _key not in _all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_digitalwallettokens_card_cardtoken" % _key
                )
            _params[_key] = _val
        del _params['kwargs']

        _collection_formats = {}

        # process the path parameters
        _path_params = {}
        if _params['card_token']:
            _path_params['card_token'] = _params['card_token']


        # process the query parameters
        _query_params = []
        if _params.get('count') is not None:  # noqa: E501
            _query_params.append(('count', _params['count']))

        if _params.get('start_index') is not None:  # noqa: E501
            _query_params.append(('start_index', _params['start_index']))

        if _params.get('sort_by') is not None:  # noqa: E501
            _query_params.append(('sort_by', _params['sort_by']))

        # process the header parameters
        _header_params = dict(_params.get('_headers', {}))
        # process the form parameters
        _form_params = []
        _files = {}
        # process the body parameter
        _body_params = None
        # set the HTTP header `Accept`
        _header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # authentication setting
        _auth_settings = []  # noqa: E501

        _response_types_map = {
            '200': "DigitalWalletTokenListResponse",
            '400': None,
            '404': None,
            '500': None,
        }

        return self.api_client.call_api(
            '/digitalwallettokens/card/{card_token}', 'GET',
            _path_params,
            _query_params,
            _header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            response_types_map=_response_types_map,
            auth_settings=_auth_settings,
            async_req=_params.get('async_req'),
            _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=_params.get('_preload_content', True),
            _request_timeout=_params.get('_request_timeout'),
            collection_formats=_collection_formats,
            _request_auth=_params.get('_request_auth'))

    @validate_arguments
    def get_digitalwallettokens_token(self, token : Annotated[StrictStr, Field(..., description="Digital wallet token")], **kwargs) -> DigitalWalletToken:  # noqa: E501
        """Returns a specific digital wallet token  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.get_digitalwallettokens_token(token, async_req=True)
        >>> result = thread.get()

        :param token: Digital wallet token (required)
        :type token: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: DigitalWalletToken
        """
        kwargs['_return_http_data_only'] = True
        return self.get_digitalwallettokens_token_with_http_info(token, **kwargs)  # noqa: E501

    @validate_arguments
    def get_digitalwallettokens_token_with_http_info(self, token : Annotated[StrictStr, Field(..., description="Digital wallet token")], **kwargs):  # noqa: E501
        """Returns a specific digital wallet token  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.get_digitalwallettokens_token_with_http_info(token, async_req=True)
        >>> result = thread.get()

        :param token: Digital wallet token (required)
        :type token: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: response data without head status code
                                       and headers
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(DigitalWalletToken, status_code(int), headers(HTTPHeaderDict))
        """

        _params = locals()

        _all_params = [
            'token'
        ]
        _all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout',
                '_request_auth',
                '_content_type',
                '_headers'
            ]
        )

        # validate the arguments
        for _key, _val in _params['kwargs'].items():
            if _key not in _all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_digitalwallettokens_token" % _key
                )
            _params[_key] = _val
        del _params['kwargs']

        _collection_formats = {}

        # process the path parameters
        _path_params = {}
        if _params['token']:
            _path_params['token'] = _params['token']


        # process the query parameters
        _query_params = []
        # process the header parameters
        _header_params = dict(_params.get('_headers', {}))
        # process the form parameters
        _form_params = []
        _files = {}
        # process the body parameter
        _body_params = None
        # set the HTTP header `Accept`
        _header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # authentication setting
        _auth_settings = []  # noqa: E501

        _response_types_map = {
            '200': "DigitalWalletToken",
            '400': None,
            '404': None,
            '500': None,
        }

        return self.api_client.call_api(
            '/digitalwallettokens/{token}', 'GET',
            _path_params,
            _query_params,
            _header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            response_types_map=_response_types_map,
            auth_settings=_auth_settings,
            async_req=_params.get('async_req'),
            _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=_params.get('_preload_content', True),
            _request_timeout=_params.get('_request_timeout'),
            collection_formats=_collection_formats,
            _request_auth=_params.get('_request_auth'))

    @validate_arguments
    def get_digitalwallettokens_token_showtokenpan(self, token : Annotated[StrictStr, Field(..., description="Digital wallet token")], **kwargs) -> DigitalWalletToken:  # noqa: E501
        """Returns a specific digital wallet token PAN visible  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.get_digitalwallettokens_token_showtokenpan(token, async_req=True)
        >>> result = thread.get()

        :param token: Digital wallet token (required)
        :type token: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: DigitalWalletToken
        """
        kwargs['_return_http_data_only'] = True
        return self.get_digitalwallettokens_token_showtokenpan_with_http_info(token, **kwargs)  # noqa: E501

    @validate_arguments
    def get_digitalwallettokens_token_showtokenpan_with_http_info(self, token : Annotated[StrictStr, Field(..., description="Digital wallet token")], **kwargs):  # noqa: E501
        """Returns a specific digital wallet token PAN visible  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.get_digitalwallettokens_token_showtokenpan_with_http_info(token, async_req=True)
        >>> result = thread.get()

        :param token: Digital wallet token (required)
        :type token: str
        :param async_req: Whether to execute the request asynchronously.
        :type async_req: bool, optional
        :param _return_http_data_only: response data without head status code
                                       and headers
        :type _return_http_data_only: bool, optional
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :type _preload_content: bool, optional
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :param _request_auth: set to override the auth_settings for an a single
                              request; this effectively ignores the authentication
                              in the spec for a single request.
        :type _request_auth: dict, optional
        :type _content_type: string, optional: force content-type for the request
        :return: Returns the result object.
                 If the method is called asynchronously,
                 returns the request thread.
        :rtype: tuple(DigitalWalletToken, status_code(int), headers(HTTPHeaderDict))
        """

        _params = locals()

        _all_params = [
            'token'
        ]
        _all_params.extend(
            [
                'async_req',
                '_return_http_data_only',
                '_preload_content',
                '_request_timeout',
                '_request_auth',
                '_content_type',
                '_headers'
            ]
        )

        # validate the arguments
        for _key, _val in _params['kwargs'].items():
            if _key not in _all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_digitalwallettokens_token_showtokenpan" % _key
                )
            _params[_key] = _val
        del _params['kwargs']

        _collection_formats = {}

        # process the path parameters
        _path_params = {}
        if _params['token']:
            _path_params['token'] = _params['token']


        # process the query parameters
        _query_params = []
        # process the header parameters
        _header_params = dict(_params.get('_headers', {}))
        # process the form parameters
        _form_params = []
        _files = {}
        # process the body parameter
        _body_params = None
        # set the HTTP header `Accept`
        _header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # authentication setting
        _auth_settings = []  # noqa: E501

        _response_types_map = {
            '200': "DigitalWalletToken",
            '400': None,
            '404': None,
            '500': None,
        }

        return self.api_client.call_api(
            '/digitalwallettokens/{token}/showtokenpan', 'GET',
            _path_params,
            _query_params,
            _header_params,
            body=_body_params,
            post_params=_form_params,
            files=_files,
            response_types_map=_response_types_map,
            auth_settings=_auth_settings,
            async_req=_params.get('async_req'),
            _return_http_data_only=_params.get('_return_http_data_only'),  # noqa: E501
            _preload_content=_params.get('_preload_content', True),
            _request_timeout=_params.get('_request_timeout'),
            collection_formats=_collection_formats,
            _request_auth=_params.get('_request_auth'))
