com.google.shopping.merchant.inventories.v1beta
A client to Merchant API
The interfaces provided are listed below, along with usage samples.
LocalInventoryServiceClient
Service Description: Service to manage local inventory for products
Sample for LocalInventoryServiceClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (LocalInventoryServiceClient localInventoryServiceClient =
LocalInventoryServiceClient.create()) {
InsertLocalInventoryRequest request =
InsertLocalInventoryRequest.newBuilder()
.setParent("parent-995424086")
.setLocalInventory(LocalInventory.newBuilder().build())
.build();
LocalInventory response = localInventoryServiceClient.insertLocalInventory(request);
}
RegionalInventoryServiceClient
Service Description: Service to manage regional inventory for products. There is also separate
regions
resource and API to manage regions definitions.
Sample for RegionalInventoryServiceClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (RegionalInventoryServiceClient regionalInventoryServiceClient =
RegionalInventoryServiceClient.create()) {
InsertRegionalInventoryRequest request =
InsertRegionalInventoryRequest.newBuilder()
.setParent("parent-995424086")
.setRegionalInventory(RegionalInventory.newBuilder().build())
.build();
RegionalInventory response = regionalInventoryServiceClient.insertRegionalInventory(request);
}