Search in sources :

Example 1 with ProductChannel

use of com.google.api.ads.adwords.axis.v201809.cm.ProductChannel in project googleads-java-lib by googleads.

the class ProductDimensionsTest method testCreateChannel.

/**
 * Test method for createChannel.
 */
@Test
public void testCreateChannel() {
    ProductChannel channel = ProductDimensions.createChannel(ShoppingProductChannel.LOCAL);
    assertEquals(ShoppingProductChannel.LOCAL, channel.getChannel());
}
Also used : ShoppingProductChannel(com.google.api.ads.adwords.axis.v201809.cm.ShoppingProductChannel) ProductChannel(com.google.api.ads.adwords.axis.v201809.cm.ProductChannel) Test(org.junit.Test)

Example 2 with ProductChannel

use of com.google.api.ads.adwords.axis.v201809.cm.ProductChannel in project googleads-java-lib by googleads.

the class ProductDimensions method createChannel.

/**
 * Creates a new ProductChannel.
 *
 * @param channel may be null if creating an "other" dimension
 */
public static ProductChannel createChannel(@Nullable ShoppingProductChannel channel) {
    ProductChannel productChannel = new ProductChannel();
    productChannel.setChannel(channel);
    return productChannel;
}
Also used : ShoppingProductChannel(com.google.api.ads.adwords.axis.v201809.cm.ShoppingProductChannel) ProductChannel(com.google.api.ads.adwords.axis.v201809.cm.ProductChannel)

Aggregations

ProductChannel (com.google.api.ads.adwords.axis.v201809.cm.ProductChannel)2 ShoppingProductChannel (com.google.api.ads.adwords.axis.v201809.cm.ShoppingProductChannel)2 Test (org.junit.Test)1