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'],);