/// <summary> /// Runs the code example. /// </summary> /// <param name="service">An authenticated AdExchangeBuyerService</param> public override void Run(AdExchangeBuyerService service) { long accountId = long.Parse("INSERT ACCOUNT ID HERE"); string configName = "INSERT CONFIG NAME HERE"; PretargetingConfig.DimensionsData dimensions = new PretargetingConfig.DimensionsData { Width = int.Parse("INSERT WIDTH HERE"), Height = int.Parse("INSERT HEIGHT HERE") }; bool active = bool.Parse("INSERT TRUE OR FALSE HERE"); PretargetingConfig config = new PretargetingConfig { ConfigName = configName, CreativeType = new[] { "PRETARGETING_CREATIVE_TYPE_HTML" }, Dimensions = new[] { dimensions }, IsActive = active }; PretargetingConfig responseConfig = service.PretargetingConfig. Insert(config, accountId).Execute(); Console.WriteLine("Inserted new pretargeting config:"); Console.WriteLine("Config Name: {0}", responseConfig.ConfigName); Console.WriteLine("Config Id: {0}", responseConfig.ConfigId); Console.WriteLine("Is active: {0}", responseConfig.IsActive); Console.WriteLine("Creative Type: {0}", responseConfig.CreativeType); }