public ProfileResponse updateCard(String profileId, Card card)
			throws BeanstreamApiException {

		ProfilesUtils.validateProfileId(profileId);
		Gateway.assertNotNull(card, "card is is null");
		String cardId = card.getId();
		Gateway.assertNotEmpty(cardId, "card Id is empty");
		String url = BeanstreamUrls.getProfileCardUrl(config.getPlatform(),
				config.getVersion(), profileId, cardId);
                
                if (card.getNumber().contains("X") || card.getNumber().contains("x"))
                    card.setNumber(null);
                card.setType(null);
                card.setFunction(null);
                CardWrapper cw = new CardWrapper(card);
                
		// send the card json without id
		JsonElement _card = gson.toJsonTree(cw, CardWrapper.class);
		String response = connector.ProcessTransaction(HttpMethod.put, url,
				_card);
		return gson.fromJson(response, ProfileResponse.class);

	}