public static function update(
        int $cardId,
        string $pinCode = null,
        string $activationCode = null,
        string $status = null,
        Amount $cardLimit = null,
        Amount $cardLimitAtm = null,
        array $limit = null,
        CardMagStripePermission $magStripePermission = null,
        array $countryPermission = null,
        array $pinCodeAssignment = null,
        array $primaryAccountNumbersVirtual = null,
        int $monetaryAccountIdFallback = null,
        array $customHeaders = []
    ): BunqResponseCard {
        $apiClient = new ApiClient(static::getApiContext());
        $apiClient->enableEncryption();
        $responseRaw = $apiClient->put(
            vsprintf(
                self::ENDPOINT_URL_UPDATE,
                [static::determineUserId(), $cardId]
            ),
            [
                self::FIELD_PIN_CODE => $pinCode,
                self::FIELD_ACTIVATION_CODE => $activationCode,
                self::FIELD_STATUS => $status,
                self::FIELD_CARD_LIMIT => $cardLimit,
                self::FIELD_CARD_LIMIT_ATM => $cardLimitAtm,
                self::FIELD_LIMIT => $limit,
                self::FIELD_MAG_STRIPE_PERMISSION => $magStripePermission,
                self::FIELD_COUNTRY_PERMISSION => $countryPermission,
                self::FIELD_PIN_CODE_ASSIGNMENT => $pinCodeAssignment,
                self::FIELD_PRIMARY_ACCOUNT_NUMBERS_VIRTUAL => $primaryAccountNumbersVirtual,
                self::FIELD_MONETARY_ACCOUNT_ID_FALLBACK => $monetaryAccountIdFallback,
            ],
            $customHeaders
        );

        return BunqResponseCard::castFromBunqResponse(
            static::fromJson($responseRaw, self::OBJECT_TYPE_PUT)
        );
    }
public static function update(
        int $cardId,
        string $pinCode = null,
        string $activationCode = null,
        string $status = null,
        Amount $cardLimit = null,
        Amount $cardLimitAtm = null,
        array $limit = null,
        CardMagStripePermission $magStripePermission = null,
        array $countryPermission = null,
        array $pinCodeAssignment = null,
        array $primaryAccountNumbersVirtual = null,
        int $monetaryAccountIdFallback = null,
        array $customHeaders = []
    ): BunqResponseCard {
        $apiClient = new ApiClient(static::getApiContext());
        $apiClient->enableEncryption();
        $responseRaw = $apiClient->put(
            vsprintf(
                self::ENDPOINT_URL_UPDATE,
                [static::determineUserId(), $cardId]
            ),
            [
                self::FIELD_PIN_CODE => $pinCode,
                self::FIELD_ACTIVATION_CODE => $activationCode,
                self::FIELD_STATUS => $status,
                self::FIELD_CARD_LIMIT => $cardLimit,
                self::FIELD_CARD_LIMIT_ATM => $cardLimitAtm,
                self::FIELD_LIMIT => $limit,
                self::FIELD_MAG_STRIPE_PERMISSION => $magStripePermission,
                self::FIELD_COUNTRY_PERMISSION => $countryPermission,
                self::FIELD_PIN_CODE_ASSIGNMENT => $pinCodeAssignment,
                self::FIELD_PRIMARY_ACCOUNT_NUMBERS_VIRTUAL => $primaryAccountNumbersVirtual,
                self::FIELD_MONETARY_ACCOUNT_ID_FALLBACK => $monetaryAccountIdFallback,
            ],
            $customHeaders
        );

        return BunqResponseCard::castFromBunqResponse(
            static::fromJson($responseRaw, self::OBJECT_TYPE_PUT)
        );
    }
public static function update ( int $ cardId , string $ pinCode = null , string $ activationCode = null , string $ status = null , Amount $ cardLimit = null , Amount $ cardLimitAtm = null , array $ limit = null , CardMagStripePermission $ magStripePermission = null , array $ countryPermission = null , array $ pinCodeAssignment = null , array $ primaryAccountNumbersVirtual = null , int $ monetaryAccountIdFallback = null , array $ customHeaders = [ ] ) : BunqResponseCard { $ apiClient = new ApiClient ( static :: getApiContext ( ) ) ; $ apiClient -> enableEncryption ( ) ; $ responseRaw = $ apiClient -> put ( vsprintf ( self :: ENDPOINT_URL_UPDATE , [ static :: determineUserId ( ) , $ cardId ] ) , [ self :: FIELD_PIN_CODE => $ pinCode , self :: FIELD_ACTIVATION_CODE => $ activationCode , self :: FIELD_STATUS => $ status , self :: FIELD_CARD_LIMIT => $ cardLimit , self :: FIELD_CARD_LIMIT_ATM => $ cardLimitAtm , self :: FIELD_LIMIT => $ limit , self :: FIELD_MAG_STRIPE_PERMISSION => $ magStripePermission , self :: FIELD_COUNTRY_PERMISSION => $ countryPermission , self :: FIELD_PIN_CODE_ASSIGNMENT => $ pinCodeAssignment , self :: FIELD_PRIMARY_ACCOUNT_NUMBERS_VIRTUAL => $ primaryAccountNumbersVirtual , self :: FIELD_MONETARY_ACCOUNT_ID_FALLBACK => $ monetaryAccountIdFallback , ] , $ customHeaders ) ; return BunqResponseCard :: castFromBunqResponse ( static :: fromJson ( $ responseRaw , self :: OBJECT_TYPE_PUT ) ) ; }
Update the card details. Allow to change pin code, status, limits,
country permissions and the monetary account connected to the card. When
the card has been received, it can be also activated through this
endpoint.

@param int $cardId
@param string|null $pinCode                              The plaintext pin code. Requests require
encryption to be enabled.
@param string|null $activationCode                       DEPRECATED: Activate a card by setting
status to ACTIVE when the order_status is
ACCEPTED_FOR_PRODUCTION.
@param string|null $status                               The status to set for the card. Can be ACTIVE,
DEACTIVATED, LOST, STOLEN or CANCELLED, and can only be
set to LOST/STOLEN/CANCELLED when order status is
ACCEPTED_FOR_PRODUCTION/DELIVERED_TO_CUSTOMER/CARD_UPDATE_REQUESTED/CARD_UPDATE_SENT/CARD_UPDATE_ACCEPTED.
Can only be set to DEACTIVATED after initial
activation, i.e. order_status is
DELIVERED_TO_CUSTOMER/CARD_UPDATE_REQUESTED/CARD_UPDATE_SENT/CARD_UPDATE_ACCEPTED.
Mind that all the possible choices (apart from ACTIVE
and DEACTIVATED) are permanent and cannot be changed
after.
@param Amount|null $cardLimit                            The spending limit for the card.
@param Amount|null $cardLimitAtm                         The ATM spending limit for the card.
@param CardLimit[]|null $limit                           DEPRECATED: The limits to define for the
card, among CARD_LIMIT_CONTACTLESS, CARD_LIMIT_ATM,
CARD_LIMIT_DIPPING and CARD_LIMIT_POS_ICC (e.g. 25 EUR
for CARD_LIMIT_CONTACTLESS). All the limits must be
provided on update.
@param CardMagStripePermission|null $magStripePermission DEPRECATED:
Whether or not it is allowed to use the mag stripe for
the card.
@param CardCountryPermission[]|null $countryPermission   The countries for
which to grant (temporary) permissions to use the card.
@param CardPinAssignment[]|null $pinCodeAssignment       Array of Types, PINs,
account IDs assigned to the card.
@param CardVirtualPrimaryAccountNumber[]|null
$primaryAccountNumbersVirtual Array of PANs, status,
description and account id for online cards.
@param int|null $monetaryAccountIdFallback               ID of the MA to be used as
fallback for this card if insufficient balance.
Fallback account is removed if not supplied.
@param string[] $customHeaders

@return BunqResponseCard
Update the card details . Allow to change pin code status limits country permissions and the monetary account connected to the card . When the card has been received it can be also activated through this endpoint .