TransactionArrayType items = itemsAwaitingFeedback.getTransactionArray();
GetUserCall getUserCall = new GetUserCall(apiContext);
String commentingUser = getUserCall.getUser().getUserID();
for (int i = 0;i < items.getTransactionLength(); i++) {
Map<String, Object> entry = FastMap.newInstance();
TransactionType transection = items.getTransaction(i);
entry.put("itemID", transection.getItem().getItemID());
entry.put("commentingUser", commentingUser);
entry.put("title", transection.getItem().getTitle());
entry.put("transactionID", transection.getTransactionID());
if (transection.getBuyer() != null) {
entry.put("userID", transection.getBuyer().getUserID());
entry.put("role", "buyer");
}
if (transection.getItem().getSeller() != null) {
entry.put("userID", transection.getItem().getSeller().getUserID());
entry.put("role", "seller");
}
if (transection.getShippingDetails()!=null) {
entry.put("shippingCost", transection.getShippingDetails().getDefaultShippingCost().getValue());
entry.put("shippingCurrency", transection.getShippingDetails().getDefaultShippingCost().getCurrencyID().name());
}
if (transection.getFeedbackLeft() != null) {
entry.put("commentType", transection.getFeedbackLeft().getCommentType().name());
}
itemsResult.add(entry);
}
result.put("itemsAwaitingFeedback", itemsResult);
} catch (ApiException e) {