diff --git a/admin/app/dfp/AdUnitAgent.scala b/admin/app/dfp/AdUnitAgent.scala index 683d1edf9337..45e0ce4a7144 100644 --- a/admin/app/dfp/AdUnitAgent.scala +++ b/admin/app/dfp/AdUnitAgent.scala @@ -1,6 +1,6 @@ package dfp -import com.google.api.ads.admanager.axis.utils.v202108.StatementBuilder +import com.google.api.ads.admanager.axis.utils.v202208.StatementBuilder import common.dfp.GuAdUnit import conf.Configuration import ApiHelper.toSeq diff --git a/admin/app/dfp/ApiHelper.scala b/admin/app/dfp/ApiHelper.scala index d1696757d789..0c8aad1a5baf 100644 --- a/admin/app/dfp/ApiHelper.scala +++ b/admin/app/dfp/ApiHelper.scala @@ -1,6 +1,6 @@ package dfp -import com.google.api.ads.admanager.axis.v202108._ +import com.google.api.ads.admanager.axis.v202208._ import common.GuLogging import org.joda.time.{DateTime => JodaDateTime, DateTimeZone} diff --git a/admin/app/dfp/CustomFieldAgent.scala b/admin/app/dfp/CustomFieldAgent.scala index 33f098658831..5fcafe9be59f 100644 --- a/admin/app/dfp/CustomFieldAgent.scala +++ b/admin/app/dfp/CustomFieldAgent.scala @@ -1,7 +1,7 @@ package dfp -import com.google.api.ads.admanager.axis.utils.v202108.StatementBuilder -import com.google.api.ads.admanager.axis.v202108.{CustomFieldValue, LineItem, TextValue} +import com.google.api.ads.admanager.axis.utils.v202208.StatementBuilder +import com.google.api.ads.admanager.axis.v202208.{CustomFieldValue, LineItem, TextValue} import common.dfp.GuCustomField import concurrent.BlockingOperations diff --git a/admin/app/dfp/CustomTargetingAgent.scala b/admin/app/dfp/CustomTargetingAgent.scala index 7466c48e7720..a9b3afa43405 100644 --- a/admin/app/dfp/CustomTargetingAgent.scala +++ b/admin/app/dfp/CustomTargetingAgent.scala @@ -1,7 +1,7 @@ package dfp -import com.google.api.ads.admanager.axis.utils.v202108.StatementBuilder -import com.google.api.ads.admanager.axis.v202108.{CustomTargetingKey, CustomTargetingValue} +import com.google.api.ads.admanager.axis.utils.v202208.StatementBuilder +import com.google.api.ads.admanager.axis.v202208.{CustomTargetingKey, CustomTargetingValue} import common.GuLogging import common.dfp.{GuCustomTargeting, GuCustomTargetingValue} import concurrent.BlockingOperations diff --git a/admin/app/dfp/DataMapper.scala b/admin/app/dfp/DataMapper.scala index a1e305b934cb..653e0dd4b8dc 100644 --- a/admin/app/dfp/DataMapper.scala +++ b/admin/app/dfp/DataMapper.scala @@ -1,6 +1,6 @@ package dfp -import com.google.api.ads.admanager.axis.v202108._ +import com.google.api.ads.admanager.axis.v202208._ import common.dfp._ import dfp.ApiHelper.{isPageSkin, optJavaInt, toJodaTime, toSeq} diff --git a/admin/app/dfp/DataValidation.scala b/admin/app/dfp/DataValidation.scala index 91b155e49ffc..afbdec006506 100644 --- a/admin/app/dfp/DataValidation.scala +++ b/admin/app/dfp/DataValidation.scala @@ -1,6 +1,6 @@ package dfp -import com.google.api.ads.admanager.axis.v202108._ +import com.google.api.ads.admanager.axis.v202208._ import common.dfp._ import dfp.ApiHelper.toSeq diff --git a/admin/app/dfp/DfpApi.scala b/admin/app/dfp/DfpApi.scala index 2dfc95e39241..c5967fa54521 100644 --- a/admin/app/dfp/DfpApi.scala +++ b/admin/app/dfp/DfpApi.scala @@ -2,8 +2,8 @@ package dfp // StatementBuilder query language is PQL defined here: // https://developers.google.com/ad-manager/api/pqlreference -import com.google.api.ads.admanager.axis.utils.v202108.StatementBuilder -import com.google.api.ads.admanager.axis.v202108._ +import com.google.api.ads.admanager.axis.utils.v202208.StatementBuilder +import com.google.api.ads.admanager.axis.v202208._ import com.madgag.scala.collection.decorators.MapDecorator import common.GuLogging import common.dfp._ diff --git a/admin/app/dfp/PlacementAgent.scala b/admin/app/dfp/PlacementAgent.scala index 86beb20f8854..a2287ca66af7 100644 --- a/admin/app/dfp/PlacementAgent.scala +++ b/admin/app/dfp/PlacementAgent.scala @@ -1,6 +1,6 @@ package dfp -import com.google.api.ads.admanager.axis.utils.v202108.StatementBuilder +import com.google.api.ads.admanager.axis.utils.v202208.StatementBuilder import common.dfp.GuAdUnit import concurrent.BlockingOperations diff --git a/admin/app/dfp/Reader.scala b/admin/app/dfp/Reader.scala index b7759a1abf72..6259f06aa4f7 100644 --- a/admin/app/dfp/Reader.scala +++ b/admin/app/dfp/Reader.scala @@ -1,8 +1,8 @@ package dfp -import com.google.api.ads.admanager.axis.utils.v202108.StatementBuilder -import com.google.api.ads.admanager.axis.utils.v202108.StatementBuilder.SUGGESTED_PAGE_LIMIT -import com.google.api.ads.admanager.axis.v202108._ +import com.google.api.ads.admanager.axis.utils.v202208.StatementBuilder +import com.google.api.ads.admanager.axis.utils.v202208.StatementBuilder.SUGGESTED_PAGE_LIMIT +import com.google.api.ads.admanager.axis.v202208._ import scala.annotation.tailrec diff --git a/admin/app/dfp/ServicesWrapper.scala b/admin/app/dfp/ServicesWrapper.scala index 300f59723d59..1a5cac2c8589 100644 --- a/admin/app/dfp/ServicesWrapper.scala +++ b/admin/app/dfp/ServicesWrapper.scala @@ -1,7 +1,7 @@ package dfp import com.google.api.ads.admanager.axis.factory.AdManagerServices -import com.google.api.ads.admanager.axis.v202108._ +import com.google.api.ads.admanager.axis.v202208._ import com.google.api.ads.admanager.lib.client.AdManagerSession private[dfp] class ServicesWrapper(session: AdManagerSession) { diff --git a/admin/app/dfp/SessionLogger.scala b/admin/app/dfp/SessionLogger.scala index 3624b6dcbd37..cfd765a346c7 100644 --- a/admin/app/dfp/SessionLogger.scala +++ b/admin/app/dfp/SessionLogger.scala @@ -1,7 +1,7 @@ package dfp -import com.google.api.ads.admanager.axis.utils.v202108.StatementBuilder -import com.google.api.ads.admanager.axis.v202108._ +import com.google.api.ads.admanager.axis.utils.v202208.StatementBuilder +import com.google.api.ads.admanager.axis.v202208._ import common.GuLogging import scala.util.control.NonFatal diff --git a/admin/app/dfp/SessionWrapper.scala b/admin/app/dfp/SessionWrapper.scala index 879c25c75a8e..e1574e1c0689 100644 --- a/admin/app/dfp/SessionWrapper.scala +++ b/admin/app/dfp/SessionWrapper.scala @@ -2,8 +2,8 @@ package dfp import com.google.api.ads.common.lib.auth.OfflineCredentials import com.google.api.ads.common.lib.auth.OfflineCredentials.Api -import com.google.api.ads.admanager.axis.utils.v202108.{ReportDownloader, StatementBuilder} -import com.google.api.ads.admanager.axis.v202108._ +import com.google.api.ads.admanager.axis.utils.v202208.{ReportDownloader, StatementBuilder} +import com.google.api.ads.admanager.axis.v202208._ import com.google.api.ads.admanager.lib.client.AdManagerSession import com.google.common.io.CharSource import common.GuLogging @@ -226,7 +226,6 @@ object SessionWrapper extends GuLogging { } catch { case NonFatal(e) => log.error(s"Building DFP session failed.", e) - println(s"Building DFP session failed.", e) DfpSessionErrors.increment(); None } diff --git a/admin/app/jobs/CommercialDfpReporting.scala b/admin/app/jobs/CommercialDfpReporting.scala index 1b736c5d9091..4ff5c9f5698d 100644 --- a/admin/app/jobs/CommercialDfpReporting.scala +++ b/admin/app/jobs/CommercialDfpReporting.scala @@ -3,10 +3,10 @@ package jobs import java.time.{LocalDate, LocalDateTime} import app.LifecycleComponent -import com.google.api.ads.admanager.axis.v202108.Column.{AD_SERVER_IMPRESSIONS, AD_SERVER_WITHOUT_CPD_AVERAGE_ECPM} -import com.google.api.ads.admanager.axis.v202108.DateRangeType.CUSTOM_DATE -import com.google.api.ads.admanager.axis.v202108.Dimension.{CUSTOM_CRITERIA, DATE} -import com.google.api.ads.admanager.axis.v202108._ +import com.google.api.ads.admanager.axis.v202208.Column.{AD_SERVER_IMPRESSIONS, AD_SERVER_WITHOUT_CPD_AVERAGE_ECPM} +import com.google.api.ads.admanager.axis.v202208.DateRangeType.CUSTOM_DATE +import com.google.api.ads.admanager.axis.v202208.Dimension.{CUSTOM_CRITERIA, DATE} +import com.google.api.ads.admanager.axis.v202208._ import common.{AkkaAsync, Box, JobScheduler, GuLogging} import dfp.DfpApi import play.api.inject.ApplicationLifecycle diff --git a/admin/test/dfp/DfpApiValidationTest.scala b/admin/test/dfp/DfpApiValidationTest.scala index f6e7cc090dc5..4df0282291c6 100644 --- a/admin/test/dfp/DfpApiValidationTest.scala +++ b/admin/test/dfp/DfpApiValidationTest.scala @@ -2,7 +2,7 @@ package dfp import concurrent.BlockingOperations import common.dfp.{GuAdUnit, GuLineItem, GuTargeting, Sponsorship} -import com.google.api.ads.admanager.axis.v202108._ +import com.google.api.ads.admanager.axis.v202208._ import org.joda.time.DateTime import akka.actor.ActorSystem import org.scalatest.flatspec.AnyFlatSpec diff --git a/admin/test/dfp/ReaderTest.scala b/admin/test/dfp/ReaderTest.scala index a34fdbb35f17..cc83c6d62468 100644 --- a/admin/test/dfp/ReaderTest.scala +++ b/admin/test/dfp/ReaderTest.scala @@ -1,6 +1,6 @@ package dfp -import com.google.api.ads.admanager.axis.utils.v202108.StatementBuilder +import com.google.api.ads.admanager.axis.utils.v202208.StatementBuilder import dfp.Reader.read import org.scalatest.flatspec.AnyFlatSpec import org.scalatest.matchers.should.Matchers diff --git a/project/Dependencies.scala b/project/Dependencies.scala index c0319cfabee0..4a6ed9d1fe98 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -34,7 +34,7 @@ object Dependencies { val commonsIo = "commons-io" % "commons-io" % "2.5" val cssParser = "net.sourceforge.cssparser" % "cssparser" % "0.9.23" val contentApiClient = "com.gu" %% "content-api-client" % capiVersion - val dfpAxis = "com.google.api-ads" % "dfp-axis" % "4.15.1" + val dfpAxis = "com.google.api-ads" % "dfp-axis" % "4.20.0" val faciaFapiScalaClient = "com.gu" %% "fapi-client-play27" % faciaVersion val identityCookie = "com.gu.identity" %% "identity-cookie" % identityLibVersion val identityModel = "com.gu.identity" %% "identity-model" % identityLibVersion