Skip to content

Commit

Permalink
Merge pull request #107 from timothyasp/master
Browse files Browse the repository at this point in the history
Upgrade to v11
  • Loading branch information
hborras authored Oct 28, 2022
2 parents d22137d + bb69aab commit 60c02b8
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/TwitterAds.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*/
class TwitterAds extends Config
{
const API_VERSION = '10';
const API_VERSION = '11';
const API_REST_VERSION = '1.1';
const API_HOST = 'https://ads-api.twitter.com';
const API_HOST_SANDBOX = 'https://ads-api-sandbox.twitter.com';
Expand Down
18 changes: 18 additions & 0 deletions src/TwitterAds/Campaign/Campaign.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class Campaign extends Analytics
protected $properties = [
CampaignFields::NAME,
CampaignFields::FUNDING_INSTRUMENT_ID,
CampaignFields::BUDGET_OPTIMIZATION,
CampaignFields::START_TIME,
CampaignFields::END_TIME,
CampaignFields::ENTITY_STATUS,
Expand All @@ -51,6 +52,7 @@ class Campaign extends Analytics
protected $daily_budget_amount_local_micro;
protected $total_budget_amount_local_micro;
protected $duration_in_days;
protected $budget_optimization;
protected $frequency_cap;

/**
Expand Down Expand Up @@ -252,6 +254,22 @@ public function setStandardDelivery($standard_delivery)
$this->standard_delivery = $standard_delivery;
}

/**
* @return mixed
*/
public function getBudgetOptimization()
{
return $this->budget_optimization;
}

/**
* @param mixed $budget_optimization
*/
public function setBudgetOptimization($budget_optimization)
{
$this->budget_optimization = $budget_optimization;
}

/**
* @return mixed
*/
Expand Down
4 changes: 2 additions & 2 deletions src/TwitterAds/Fields/CampaignFields.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ class CampaignFields extends Fields
const ENTITY_STATUS = 'entity_status';
const WITH_TOTAL_COUNT = 'with_total_count';
const WITH_DRAFT = 'with_draft';

const ACCOUNT_ID = 'account_id';
const BUDGET_OPTIMIZATION = 'budget_optimization';
const ACCOUNT_ID = 'account_id';
const CAMPAIGN_IDS = 'campaign_ids';
const FUNDING_INSTRUMENT_IDS = 'funding_instrument_ids';
}

0 comments on commit 60c02b8

Please sign in to comment.