Does anyone have any getting started type code, without Lambda Expressions, to give me an idea of how the library works. My editor it seems does not like the code, and to be honest, I understand using them, self taught, and just cannot decode the logic. If you could point me the right direction it would be appreciated.
Example this section, I just do not get the logic, in that I do not see the Location object listed as being returned by the method.
I see a few examples here for the customer object, and I will need to design a post back once processed to generate my electronic product. Netbeans is complaining about it not being compatible above Java 8, which confuses me a little as well.
Thanks
locationsApi.listLocationsAsync()
.thenAccept(result -> {
for (Location l : result.getLocations()) {
System.out.printf(
"%s: %s, %s, %s\n",
l.getId(),
l.getName(),
l.getAddress().getAddressLine1(),
l.getAddress().getLocality());
}
})
.exceptionally(exception -> {
try {
throw exception.getCause();
} catch (ApiException ae) {
for (Error err : ae.getErrors()) {
System.out.println(err.getCategory());
System.out.println(err.getCode());
System.out.println(err.getDetail());
}
} catch (Throwable t) {
t.printStackTrace();
}
return null;
})