public static void validateProfileReq(ProfileRequest profileRequest)
			throws BeanstreamApiException {
		Gateway.assertNotNull(profileRequest, "profile request object is null");
		Card card = profileRequest.getCard();
		Address billing = profileRequest.getBilling();
		Token token = profileRequest.getToken();
		
		if (card == null && token == null) {
			BeanstreamResponse response = BeanstreamResponse.fromMessage("invalid create request, both token and card objects are null");
            throw BeanstreamApiException.getMappedException(HttpStatus.SC_BAD_REQUEST, response);
		}
		
		if (token == null) {
			validateCard(card);
		}
		
		if (card == null) {
			validateToken(token);
		}

		validateBillingAddr(billing);
	}