Skip to content

Commit

Permalink
Fix bug in set_lifetime_budget (#140)
Browse files Browse the repository at this point in the history
campaign_update_request should be a list instead of a single campaign request
  • Loading branch information
t20 authored Oct 30, 2024
1 parent 72f3c2a commit c855094
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pinterest/ads/campaigns.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit c855094

Please sign in to comment.