Skip to content

Commit

Permalink
Create
Browse files Browse the repository at this point in the history
  • Loading branch information
aliakh committed Jul 12, 2024
1 parent 4d8d4d0 commit f00f4af
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions src/main/java/handson/Task05a_INSTORE_ME.java
Original file line number Diff line number Diff line change
Expand Up @@ -126,24 +126,24 @@ public static void main(String[] args) throws IOException, ExecutionException, I
final String storeCustomerEmail = getCustomerEmail(storeMeApiClientPrefix);

logger.info("Created in-store cart with a store api client: "+
storeClient
.inStore(meStoreKey)
.me()
.carts()
.post(
MyCartDraftBuilder.of()
.deleteDaysAfterLastModification(90L)
.currency("EUR")
.customerEmail(storeCustomerEmail)
.build()
)
.execute()
.exceptionally(throwable -> {
logger.info(throwable.getLocalizedMessage().toString());
return null;
})
.toCompletableFuture().get()
.getBody().getId()
meStoreClient
.inStore(meStoreKey)
.me()
.carts()
.post(
MyCartDraftBuilder.of()
.deleteDaysAfterLastModification(90L)
.currency("EUR")
.customerEmail(storeCustomerEmail)
.build()
)
.execute()
.exceptionally(throwable -> {
logger.info(throwable.getLocalizedMessage());
return null;
})
.toCompletableFuture().get()
.getBody().getId()
);
meStoreClient.close();

Expand Down

0 comments on commit f00f4af

Please sign in to comment.