public BankBillet update(BankBillet billet)
			throws CobreGratisBadRequestException,
			CobreGratisUnauthorizedException, CobreGratisForbiddenException,
			CobreGratisNotFoundException,
			CobreGratisServiceUnavailableException,
			CobreGratisInternalServerErrorException,
			CobreGratisTooManyRequestsException,
			CobreGratisUnprocessibleEntityException {
		BankBilletWrapper wrapper = new BankBilletWrapper();
		wrapper.setBankBillet(billet);
		String json = gson.toJson(wrapper);
		ClientResponse response = getWebResource().path("bank_billets")
				.path(billet.getId().toString())
				.type(MediaType.APPLICATION_JSON)
				.accept(MediaType.APPLICATION_JSON).header("User-Agent", appId)
				.put(ClientResponse.class, json);
		switch (response.getStatus()) {
		case 200:
			return billet;
		case 400:
			throw new CobreGratisBadRequestException();
		case 401:
			throw new CobreGratisUnauthorizedException();
		case 403:
			throw new CobreGratisForbiddenException();
		case 404:
			throw new CobreGratisNotFoundException();
		case 422:
			JsonParser parser = new JsonParser();
			JsonObject object = (JsonObject)parser.parse( response.getEntity(String.class) );
			throw new CobreGratisUnprocessibleEntityException(object.get("error").getAsString());
		case 429:
			throw new CobreGratisTooManyRequestsException();
		case 503:
			throw new CobreGratisServiceUnavailableException();
		case 500:
			throw new CobreGratisInternalServerErrorException();
		default:
			break;
		}
		return null;
	}