The new Java SDK has practically all fields has Optional<> rather than the previous String, int, etc. This makes it much more cumbersome to work with - e.g. location.name().orElse(null)
.
Is there some feature in the SDK or in Java that makes this easier to deal with or must we do .get()/.orElse() on each field?
A real example:
RefundPaymentResponse resp = ...;
double refunded = resp.getRefund().get().getAmountMoney().getAmount().get()/100.0;
4 posts - 2 participants