AppEdit edit = editRequest.execute();
final String editId = edit.getId();
log.info(String.format("Created edit with id: %s", editId));
// Update listing for US version of the application.
final Listing newUsListing = new Listing();
newUsListing.setTitle(US_LISTING_TITLE)
.setFullDescription(US_LISTING_FULL_DESCRIPTION)
.setShortDescription(US_LISTING_SHORT_DESCRITPION)
.setVideo(LISTINGS_PROMO_VIDEO);
Update updateUSListingsRequest = edits
.listings()
.update(ApplicationConfig.PACKAGE_NAME,
editId,
Locale.US.toString(),
newUsListing);
Listing updatedUsListing = updateUSListingsRequest.execute();
log.info(String.format("Created new US app listing with title: %s",
updatedUsListing.getTitle()));
// Create and update listing for UK version of the application.
final Listing newUkListing = new Listing();
newUkListing.setTitle(UK_LISTING_TITLE)
.setFullDescription(UK_LISTING_FULL_DESCRIPTION)
.setShortDescription(UK_LISTING_SHORT_DESCRITPION)
.setVideo(LISTINGS_PROMO_VIDEO);
Update updateUkListingsRequest = edits
.listings()
.update(ApplicationConfig.PACKAGE_NAME,
editId,
Locale.UK.toString(),
newUkListing);
Listing updatedUkListing = updateUkListingsRequest.execute();
log.info(String.format("Created new UK app listing with title: %s",
updatedUkListing.getTitle()));
// Commit changes for edit.
Commit commitRequest = edits.commit(ApplicationConfig.PACKAGE_NAME, editId);
AppEdit appEdit = commitRequest.execute();
log.info(String.format("App edit with id %s has been comitted", appEdit.getId()));