feat: added changes towards spending date checking

This commit is contained in:
brian-inspiren 2026-08-06 17:33:01 +08:00
parent 771229db18
commit 98057f74ac

View File

@ -22,7 +22,7 @@
use Google\Ads\GoogleAds\V22\Enums\PolicyReviewStatusEnum\PolicyReviewStatus; use Google\Ads\GoogleAds\V22\Enums\PolicyReviewStatusEnum\PolicyReviewStatus;
use Google\Ads\GoogleAds\V22\Services\SearchGoogleAdsRequest; use Google\Ads\GoogleAds\V22\Services\SearchGoogleAdsRequest;
use Illuminate\Support\Facades\Log as FacadesLog; use Illuminate\Support\Facades\Log as FacadesLog;
use Carbon\Carbon;
class GoogleAdsService class GoogleAdsService
{ {
protected $oAuth2Credential; protected $oAuth2Credential;
@ -161,7 +161,8 @@ public function listCampaignsMetrics(string $clientCustomerId, string $campaignI
$service = $client->getGoogleAdsServiceClient(); $service = $client->getGoogleAdsServiceClient();
$customerId = str_replace('-', '', $clientCustomerId); $customerId = str_replace('-', '', $clientCustomerId);
$startDate = Carbon::parse($startDate)->timezone('Asia/Kuala_Lumpur')->format('Y-m-d');
$endDate = Carbon::parse($endDate)->timezone('Asia/Kuala_Lumpur')->format('Y-m-d');
$query = <<<QUERY $query = <<<QUERY
SELECT SELECT
campaign.id, campaign.id,