Skip to content

Commit c270abc

Browse files
Fix budget capping
1 parent d4b6364 commit c270abc

2 files changed

Lines changed: 4 additions & 7 deletions

File tree

Atomx/Resources/Campaign.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,10 @@ public function setBudget($amount)
4141
$this->budget = $amount;
4242
}
4343

44-
public function setDailyBudget($dailyBudget, $pacing = 'ASAP')
44+
public function setDailyBudget($dailyBudget, $per = 86400)
4545
{
46-
if (!in_array($pacing, ['ASAP', 'EVEN']))
47-
throw new InvalidArgumentException('API: Invalid pacing provided: ' . $pacing);
48-
4946
$this->daily_budget_amount = $dailyBudget;
50-
$this->daily_budget_pacing = $pacing;
47+
$this->daily_budget_per = $per;
5148
}
5249

5350
public function setBidType($type)

Atomx/Resources/Profile.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ public function setCountryTargeting($action, $countries)
1919
$this->countries_filter = $countries;
2020
}
2121

22-
public function setFrequencyCap($capping)
22+
public function setFrequencyCap($capping, $per = 86400)
2323
{
2424
$this->impression_frequency_cap_amount = $capping;
25-
$this->impression_frequency_cap_per = 86400;
25+
$this->impression_frequency_cap_per = $per;
2626
}
2727

2828
// Dayparting times_filter[_action] [start: Nth minute of the week, end: Nth minute of the week]

0 commit comments

Comments
 (0)