Skip to content

Commit 7db53cb

Browse files
authored
samples: GRST-149 set inventory tutorial add created product detailed log (#202)
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/nodejs-retail/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) Fixes #<issue_number_goes_here> 🦕
1 parent bf2e326 commit 7db53cb

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

retail/interactive-tutorials/setup/setup-cleanup.js

+10
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,16 @@ const createProduct = async (
7171
// Run request
7272
const response = await retailClient.createProduct(request);
7373
console.log(`Product ${response[0].id} created`);
74+
75+
const createdProduct = {};
76+
createdProduct.id = response[0].id;
77+
createdProduct.name = response[0].name;
78+
createdProduct.priceInfo = response[0].priceInfo;
79+
createdProduct.fulfillmentInfo = response[0].fulfillmentInfo;
80+
createdProduct.availableQuantity = response[0].availableQuantity;
81+
createdProduct.availability = response[0].availability;
82+
console.log('Created product: ', createdProduct);
83+
7484
return response[0];
7585
};
7686

0 commit comments

Comments
 (0)