class Collections extends Resource (View source)

The "collections" collection of methods.

Typical usage is:

 $contentService = new Google\Service\ShoppingContent(...);
 $collections = $contentService->collections;

Methods

create(string $merchantId, Collection $postBody, array $optParams = [])

Uploads a collection to your Merchant Center account. If a collection with the same collectionId already exists, this method updates that entry. In each update, the collection is completely replaced by the fields in the body of the update request. (collections.create)

delete(string $merchantId, string $collectionId, array $optParams = [])

Deletes a collection from your Merchant Center account. (collections.delete)

get(string $merchantId, string $collectionId, array $optParams = [])

Retrieves a collection from your Merchant Center account. (collections.get)

listCollections(string $merchantId, array $optParams = [])

Lists the collections in your Merchant Center account. The response might contain fewer items than specified by page_size. Rely on next_page_token to determine if there are more items to be requested.

Details

Collection create(string $merchantId, Collection $postBody, array $optParams = [])

Uploads a collection to your Merchant Center account. If a collection with the same collectionId already exists, this method updates that entry. In each update, the collection is completely replaced by the fields in the body of the update request. (collections.create)

Parameters

string $merchantId

Required. The ID of the account that contains the collection. This account cannot be a multi-client account.

Collection $postBody
array $optParams

Optional parameters.

Return Value

Collection

Exceptions

Exception

delete(string $merchantId, string $collectionId, array $optParams = [])

Deletes a collection from your Merchant Center account. (collections.delete)

Parameters

string $merchantId

Required. The ID of the account that contains the collection. This account cannot be a multi-client account.

string $collectionId

Required. The collectionId of the collection. CollectionId is the same as the REST ID of the collection.

array $optParams

Optional parameters.

Exceptions

Exception

Collection get(string $merchantId, string $collectionId, array $optParams = [])

Retrieves a collection from your Merchant Center account. (collections.get)

Parameters

string $merchantId

Required. The ID of the account that contains the collection. This account cannot be a multi-client account.

string $collectionId

Required. The REST ID of the collection.

array $optParams

Optional parameters.

Return Value

Collection

Exceptions

Exception

ListCollectionsResponse listCollections(string $merchantId, array $optParams = [])

Lists the collections in your Merchant Center account. The response might contain fewer items than specified by page_size. Rely on next_page_token to determine if there are more items to be requested.

(collections.listCollections)

Parameters

string $merchantId

Required. The ID of the account that contains the collection. This account cannot be a multi-client account.

array $optParams

Optional parameters.

Return Value

ListCollectionsResponse

Exceptions

Exception