AdsApp.​ShoppingAdGroupBuilder

Builder for a shopping ad group under construction.

Typical usage:

var shoppingAdGroupBuilder = campaign.newAdGroupBuilder();
var shoppingAdGroupOperation = shoppingAdGroupBuilder
   .withName("shopping ad group name")
   .withStatus("PAUSED")
   .build();
var shoppingAdGroup = shoppingAdGroupOperation.getResult();

Methods:

MemberTypeDescription
buildAdsApp.ShoppingAdGroupOperationCreates a ShoppingAdGroup.
withCpcAdsApp.ShoppingAdGroupBuilderSets the max CPC bid of the new shopping ad group to the specified value.
withNameAdsApp.ShoppingAdGroupBuilderSets the name of the new shopping ad group to the specified value.
withStatusAdsApp.ShoppingAdGroupBuilderSets the status of the new shopping ad group to the specified value.

build()

Creates a ShoppingAdGroup. Returns a ShoppingAdGroupOperation that can be used to get the new shopping ad group (or access any associated errors if creation failed).

Return values:

TypeDescription
AdsApp.ShoppingAdGroupOperationThe associated shopping ad group operation.

withCpc(cpc)

Sets the max CPC bid of the new shopping ad group to the specified value.

Arguments:

NameTypeDescription
cpcdoubleThe max CPC bid of the shopping ad group.

Return values:

TypeDescription
AdsApp.ShoppingAdGroupBuilderThe shopping ad group builder with the specified max CPC.

withName(name)

Sets the name of the new shopping ad group to the specified value. If ad group name is not set, the shopping ad group will assume a default name ('Ad Group #5').

Arguments:

NameTypeDescription
nameStringShopping ad group name.

Return values:

TypeDescription
AdsApp.ShoppingAdGroupBuilderShopping ad group builder with the specified name.

withStatus(status)

Sets the status of the new shopping ad group to the specified value. If the status is not set, it will default to ENABLED.

Arguments:

NameTypeDescription
statusStringAd group status.

Return values:

TypeDescription
AdsApp.ShoppingAdGroupBuilderShopping ad group builder with the specified status.