From cb88cead422e9ceaa633dd71ffb6832dcdef216a Mon Sep 17 00:00:00 2001 From: Bharadwaj P Date: Wed, 30 Oct 2024 09:23:07 -0700 Subject: [PATCH] Fix bug in set_lifetime_budget campaign_update_request should be a list instead of a single campaign request --- pinterest/ads/campaigns.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pinterest/ads/campaigns.py b/pinterest/ads/campaigns.py index a67c25f..a41e120 100644 --- a/pinterest/ads/campaigns.py +++ b/pinterest/ads/campaigns.py @@ -376,11 +376,11 @@ def set_lifetime_budget(self, new_spend_cap:int) -> bool: """ api_response = self._generated_api.campaigns_update( ad_account_id=self._ad_account_id, - campaign_update_request=CampaignUpdateRequest( + campaign_update_request=[CampaignUpdateRequest( id=self._id, ad_account_id=self._ad_account_id, lifetime_spend_cap=new_spend_cap - ) + )] ) verify_api_response(api_response)