class Promotions extends Resource (View source)

The "promotions" collection of methods.

Typical usage is:

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

Methods

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

Inserts a promotion for your Merchant Center account. If the promotion already exists, then it updates the promotion instead. To [end or delete] (https://developers.google.com/shopping- content/guides/promotions#end_a_promotion) a promotion update the time period of the promotion to a time that has already passed. (promotions.create)

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

Retrieves a promotion from your Merchant Center account. (promotions.get)

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

List all promotions from your Merchant Center account.

Details

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

Inserts a promotion for your Merchant Center account. If the promotion already exists, then it updates the promotion instead. To [end or delete] (https://developers.google.com/shopping- content/guides/promotions#end_a_promotion) a promotion update the time period of the promotion to a time that has already passed. (promotions.create)

Parameters

string $merchantId

Required. The ID of the account that contains the collection.

Promotion $postBody
array $optParams

Optional parameters.

Return Value

Promotion

Exceptions

Exception

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

Retrieves a promotion from your Merchant Center account. (promotions.get)

Parameters

string $merchantId

Required. The ID of the account that contains the collection.

string $id

Required. REST ID of the promotion to retrieve.

array $optParams

Optional parameters.

Return Value

Promotion

Exceptions

Exception

ListPromotionResponse listPromotions(string $merchantId, array $optParams = [])

List all promotions from your Merchant Center account.

(promotions.listPromotions)

Parameters

string $merchantId

Required. The ID of the account that contains the collection.

array $optParams

Optional parameters.

Return Value

ListPromotionResponse

Exceptions

Exception