From f45101b68ddcff23670af1a9083188d8b6fc7628 Mon Sep 17 00:00:00 2001 From: hgc Date: Fri, 3 Jan 2025 17:30:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0update=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/service/GoogleAdsAdService.php | 2 +- app/service/GoogleAdsCampaignService.php | 2 +- app/service/GoogleAdsGroupService.php | 4 +--- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/app/service/GoogleAdsAdService.php b/app/service/GoogleAdsAdService.php index c215fcb..1273fa3 100644 --- a/app/service/GoogleAdsAdService.php +++ b/app/service/GoogleAdsAdService.php @@ -245,7 +245,7 @@ class GoogleAdsAdService extends BaseService function runUpdateAd($options): mixed { // $googleAdsClient = $this->googleAdsClient; - $googleAdsClient = new GoogleAdsClientService($options['customer_id']); + $googleAdsClient = new GoogleAdsClientService($options['refresh_token'],$options['login_customer_id']); // Creates a single shared budget to be used by the campaigns added below. $resourceNames = self::updateAd($googleAdsClient->getGoogleAdsClient(), $options['customer_id'], $options['group_id'], $options['ad_id'], $options['status']); diff --git a/app/service/GoogleAdsCampaignService.php b/app/service/GoogleAdsCampaignService.php index 137ea94..4c9cc9b 100644 --- a/app/service/GoogleAdsCampaignService.php +++ b/app/service/GoogleAdsCampaignService.php @@ -638,7 +638,7 @@ class GoogleAdsCampaignService extends BaseService public function runUpdateCampaign($options): mixed { - $googleAdsClient = new GoogleAdsClientService($options['customer_id']); + $googleAdsClient = new GoogleAdsClientService($options['refresh_token'],$options['login_customer_id']); // Creates a single shared budget to be used by the campaigns added below. $resourceName = self::updateCampaign($googleAdsClient->getGoogleAdsClient(), $options['customer_id'], $options['campaign_id'], $options['status']); diff --git a/app/service/GoogleAdsGroupService.php b/app/service/GoogleAdsGroupService.php index 7bf333b..6dc0311 100644 --- a/app/service/GoogleAdsGroupService.php +++ b/app/service/GoogleAdsGroupService.php @@ -244,8 +244,6 @@ class GoogleAdsGroupService extends BaseService /** * This example updates the CPC bid and status for a given ad group. To get ad groups, run * GetAdGroups.php. - */ - /* @param int $customerId the customer ID * @param $options * @return mixed * @throws ApiException @@ -253,7 +251,7 @@ class GoogleAdsGroupService extends BaseService public function runUpdateGroup($options): mixed { // $googleAdsClient = $this->googleAdsClient; - $googleAdsClient = new GoogleAdsClientService($options['customer_id']); + $googleAdsClient = new GoogleAdsClientService($options['refresh_token'],$options['login_customer_id']); // Creates a single shared budget to be used by the campaigns added below. // $resourceNames = self::updateGroup($googleAdsClient, $options['customer_id'], $options['group_id'], $options['status'], $options['bid_micro_amount'],);