ProjectsLocationsCatalogsBranchesProducts
class ProjectsLocationsCatalogsBranchesProducts extends Resource (View source)
The "products" collection of methods.
Typical usage is:
$retailService = new Google\Service\CloudRetail(...);
$products = $retailService->projects_locations_catalogs_branches_products;
Methods
We recommend that you use the ProductService.AddLocalInventories method instead of the ProductService.AddFulfillmentPlaces method.
Updates local inventory information for a Product at a list of places, while respecting the last update timestamps of each inventory field. This process is asynchronous and does not require the Product to exist before updating inventory information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, updates are not immediately manifested in the Product queried by ProductService.GetProduct or ProductService.ListProducts. Local inventory information can only be modified using this method.
Creates a Product. (products.create)
Deletes a Product. (products.delete)
Gets a Product. (products.get)
Bulk import of multiple Products. Request processing may be synchronous. Non- existing items are created. Note that it is possible for a subset of the Products to be successfully updated. (products.import)
Gets a list of Products.
Updates a Product. (products.patch)
Permanently deletes all selected Products under a branch. This process is asynchronous. If the request is valid, the removal will be enqueued and processed offline. Depending on the number of Products, this operation could take hours to complete. Before the operation completes, some Products may still be returned by ProductService.GetProduct or ProductService.ListProducts. Depending on the number of Products, this operation could take hours to complete. To get a sample of Products that would be deleted, set PurgeProductsRequest.force to false. (products.purge)
We recommend that you use the ProductService.RemoveLocalInventories method instead of the ProductService.RemoveFulfillmentPlaces method.
Remove local inventory information for a Product at a list of places at a removal timestamp. This process is asynchronous. If the request is valid, the removal will be enqueued and processed downstream. As a consequence, when a response is returned, removals are not immediately manifested in the Product queried by ProductService.GetProduct or ProductService.ListProducts. Local inventory information can only be removed using this method.
Updates inventory information for a Product while respecting the last update
timestamps of each inventory field. This process is asynchronous and does not
require the Product to exist before updating fulfillment information. If the
request is valid, the update is enqueued and processed downstream. As a
consequence, when a response is returned, updates are not immediately
manifested in the Product queried by ProductService.GetProduct or
ProductService.ListProducts. When inventory is updated with
ProductService.CreateProduct and ProductService.UpdateProduct, the specified
inventory field value(s) overwrite any existing value(s) while ignoring the
last update time for this field. Furthermore, the last update times for the
specified inventory fields are overwritten by the times of the
ProductService.CreateProduct or ProductService.UpdateProduct request. If no
inventory fields are set in CreateProductRequest.product, then any pre-
existing inventory information for this product is used. If no inventory
fields are set in SetInventoryRequest.set_mask, then any existing inventory
information is preserved. Pre-existing inventory information can only be
updated with ProductService.SetInventory,
ProductService.AddFulfillmentPlaces, and
ProductService.RemoveFulfillmentPlaces. The returned Operations is obsolete
after one day, and the GetOperation API returns NOT_FOUND
afterwards. If
conflicting updates are issued, the Operations associated with the stale
updates are not marked as done until they are obsolete.
Details
GoogleLongrunningOperation
addFulfillmentPlaces(string $product, GoogleCloudRetailV2AddFulfillmentPlacesRequest $postBody, array $optParams = [])
We recommend that you use the ProductService.AddLocalInventories method instead of the ProductService.AddFulfillmentPlaces method.
ProductService.AddLocalInventories achieves the same results but provides more fine-grained control over ingesting local inventory data. Incrementally adds place IDs to Product.fulfillment_info.place_ids. This process is asynchronous and does not require the Product to exist before updating fulfillment information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, the added place IDs are not immediately manifested in the Product queried by ProductService.GetProduct or ProductService.ListProducts. The returned Operations will be obsolete after 1 day, and GetOperation API will return NOT_FOUND afterwards. If conflicting updates are issued, the Operations associated with the stale updates will not be marked as done until being obsolete. (products.addFulfillmentPlaces)
GoogleLongrunningOperation
addLocalInventories(string $product, GoogleCloudRetailV2AddLocalInventoriesRequest $postBody, array $optParams = [])
Updates local inventory information for a Product at a list of places, while respecting the last update timestamps of each inventory field. This process is asynchronous and does not require the Product to exist before updating inventory information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, updates are not immediately manifested in the Product queried by ProductService.GetProduct or ProductService.ListProducts. Local inventory information can only be modified using this method.
ProductService.CreateProduct and ProductService.UpdateProduct has no effect on local inventories. The returned Operations will be obsolete after 1 day, and GetOperation API will return NOT_FOUND afterwards. If conflicting updates are issued, the Operations associated with the stale updates will not be marked as done until being obsolete. (products.addLocalInventories)
GoogleCloudRetailV2Product
create(string $parent, GoogleCloudRetailV2Product $postBody, array $optParams = [])
Creates a Product. (products.create)
GoogleProtobufEmpty
delete(string $name, array $optParams = [])
Deletes a Product. (products.delete)
GoogleCloudRetailV2Product
get(string $name, array $optParams = [])
Gets a Product. (products.get)
GoogleLongrunningOperation
import(string $parent, GoogleCloudRetailV2ImportProductsRequest $postBody, array $optParams = [])
Bulk import of multiple Products. Request processing may be synchronous. Non- existing items are created. Note that it is possible for a subset of the Products to be successfully updated. (products.import)
GoogleCloudRetailV2ListProductsResponse
listProjectsLocationsCatalogsBranchesProducts(string $parent, array $optParams = [])
Gets a list of Products.
(products.listProjectsLocationsCatalogsBranchesProducts)
GoogleCloudRetailV2Product
patch(string $name, GoogleCloudRetailV2Product $postBody, array $optParams = [])
Updates a Product. (products.patch)
GoogleLongrunningOperation
purge(string $parent, GoogleCloudRetailV2PurgeProductsRequest $postBody, array $optParams = [])
Permanently deletes all selected Products under a branch. This process is asynchronous. If the request is valid, the removal will be enqueued and processed offline. Depending on the number of Products, this operation could take hours to complete. Before the operation completes, some Products may still be returned by ProductService.GetProduct or ProductService.ListProducts. Depending on the number of Products, this operation could take hours to complete. To get a sample of Products that would be deleted, set PurgeProductsRequest.force to false. (products.purge)
GoogleLongrunningOperation
removeFulfillmentPlaces(string $product, GoogleCloudRetailV2RemoveFulfillmentPlacesRequest $postBody, array $optParams = [])
We recommend that you use the ProductService.RemoveLocalInventories method instead of the ProductService.RemoveFulfillmentPlaces method.
ProductService.RemoveLocalInventories achieves the same results but provides more fine-grained control over ingesting local inventory data. Incrementally removes place IDs from a Product.fulfillment_info.place_ids. This process is asynchronous and does not require the Product to exist before updating fulfillment information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, the removed place IDs are not immediately manifested in the Product queried by ProductService.GetProduct or ProductService.ListProducts. The returned Operations will be obsolete after 1 day, and GetOperation API will return NOT_FOUND afterwards. If conflicting updates are issued, the Operations associated with the stale updates will not be marked as done until being obsolete. (products.removeFulfillmentPlaces)
GoogleLongrunningOperation
removeLocalInventories(string $product, GoogleCloudRetailV2RemoveLocalInventoriesRequest $postBody, array $optParams = [])
Remove local inventory information for a Product at a list of places at a removal timestamp. This process is asynchronous. If the request is valid, the removal will be enqueued and processed downstream. As a consequence, when a response is returned, removals are not immediately manifested in the Product queried by ProductService.GetProduct or ProductService.ListProducts. Local inventory information can only be removed using this method.
ProductService.CreateProduct and ProductService.UpdateProduct has no effect on local inventories. The returned Operations will be obsolete after 1 day, and GetOperation API will return NOT_FOUND afterwards. If conflicting updates are issued, the Operations associated with the stale updates will not be marked as done until being obsolete. (products.removeLocalInventories)
GoogleLongrunningOperation
setInventory(string $name, GoogleCloudRetailV2SetInventoryRequest $postBody, array $optParams = [])
Updates inventory information for a Product while respecting the last update
timestamps of each inventory field. This process is asynchronous and does not
require the Product to exist before updating fulfillment information. If the
request is valid, the update is enqueued and processed downstream. As a
consequence, when a response is returned, updates are not immediately
manifested in the Product queried by ProductService.GetProduct or
ProductService.ListProducts. When inventory is updated with
ProductService.CreateProduct and ProductService.UpdateProduct, the specified
inventory field value(s) overwrite any existing value(s) while ignoring the
last update time for this field. Furthermore, the last update times for the
specified inventory fields are overwritten by the times of the
ProductService.CreateProduct or ProductService.UpdateProduct request. If no
inventory fields are set in CreateProductRequest.product, then any pre-
existing inventory information for this product is used. If no inventory
fields are set in SetInventoryRequest.set_mask, then any existing inventory
information is preserved. Pre-existing inventory information can only be
updated with ProductService.SetInventory,
ProductService.AddFulfillmentPlaces, and
ProductService.RemoveFulfillmentPlaces. The returned Operations is obsolete
after one day, and the GetOperation API returns NOT_FOUND
afterwards. If
conflicting updates are issued, the Operations associated with the stale
updates are not marked as done until they are obsolete.
(products.setInventory)