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)
        );
    }