22
33namespace Hborras \TwitterAdsSDK \TwitterAds \Campaign ;
44
5- use Hborras \TwitterAdsSDK \TwitterAds \Cursor ;
6- use Hborras \TwitterAdsSDK \TwitterAdsException ;
75use Hborras \TwitterAdsSDK \TwitterAds \Analytics ;
86use Hborras \TwitterAdsSDK \TwitterAds \Analytics \Job ;
9- use Hborras \TwitterAdsSDK \TwitterAds \Errors \BadRequest ;
10- use Hborras \TwitterAdsSDK \TwitterAds \Fields \LineItemFields ;
117use Hborras \TwitterAdsSDK \TwitterAds \Creative \PromotedTweet ;
8+ use Hborras \TwitterAdsSDK \TwitterAds \Cursor ;
9+ use Hborras \TwitterAdsSDK \TwitterAds \Errors \BadRequest ;
1210use Hborras \TwitterAdsSDK \TwitterAds \Fields \AnalyticsFields ;
11+ use Hborras \TwitterAdsSDK \TwitterAds \Fields \LineItemFields ;
12+ use Hborras \TwitterAdsSDK \TwitterAdsException ;
1313
1414/**
1515 * Class LineItem
@@ -34,7 +34,7 @@ class LineItem extends Analytics
3434 LineItemFields::CAMPAIGN_ID ,
3535 LineItemFields::BID_AMOUNT_LOCAL_MICRO ,
3636 LineItemFields::NAME ,
37- LineItemFields::BID_TYPE ,
37+ LineItemFields::BID_STRATEGY ,
3838 LineItemFields::AUTOMATICALLY_SELECT_BID ,
3939 LineItemFields::PRODUCT_TYPE ,
4040 LineItemFields::PLACEMENTS ,
@@ -45,9 +45,8 @@ class LineItem extends Analytics
4545 LineItemFields::START_TIME ,
4646 LineItemFields::END_TIME ,
4747 LineItemFields::PRIMARY_WEB_EVENT_TAG ,
48- LineItemFields::OPTIMIZATION ,
49- LineItemFields::BID_UNIT ,
50- LineItemFields::CHARGE_BY ,
48+ LineItemFields::PAY_BY ,
49+ LineItemFields::GOAL ,
5150 LineItemFields::ADVERTISER_DOMAIN ,
5251 LineItemFields::ADVERTISER_USER_ID ,
5352 LineItemFields::CATEGORIES
@@ -57,7 +56,7 @@ class LineItem extends Analytics
5756 protected $ campaign_id ;
5857 protected $ bid_amount_local_micro ;
5958 protected $ name ;
60- protected $ bid_type ;
59+ protected $ bid_strategy ;
6160 protected $ automatically_select_bid ;
6261 protected $ product_type ;
6362 protected $ placements ;
@@ -68,9 +67,8 @@ class LineItem extends Analytics
6867 protected $ start_time ;
6968 protected $ end_time ;
7069 protected $ primary_web_event_tag ;
71- protected $ optimization ;
72- protected $ bid_unit ;
73- protected $ charge_by ;
70+ protected $ pay_by ;
71+ protected $ goal ;
7472 protected $ advertiser_domain ;
7573 protected $ tracking_tags ;
7674 protected $ advertiser_user_id ;
@@ -91,10 +89,18 @@ class LineItem extends Analytics
9189 public function getPromotedTweets ($ params = [])
9290 {
9391 $ params [LineItemFields::LINE_ITEM_IDS ] = $ this ->getId ();
94- $ promotedTweetClass = new PromotedTweet ();
92+ $ promotedTweetClass = new PromotedTweet ();
9593 return $ promotedTweetClass ->loadResource ('' , $ params );
9694 }
9795
96+ /**
97+ * @return mixed
98+ */
99+ public function getId ()
100+ {
101+ return $ this ->id ;
102+ }
103+
98104 /**
99105 * @param $metricGroups
100106 * @param array $params
@@ -140,14 +146,6 @@ public function getTargetingCriteria($id = '', $params = [])
140146 return $ cursor ;
141147 }
142148
143- /**
144- * @return mixed
145- */
146- public function getId ()
147- {
148- return $ this ->id ;
149- }
150-
151149 /**
152150 * @return mixed
153151 */
@@ -231,17 +229,17 @@ public function setName($name)
231229 /**
232230 * @return mixed
233231 */
234- public function getBidType ()
232+ public function getBidStrategy ()
235233 {
236- return $ this ->bid_type ;
234+ return $ this ->bid_strategy ;
237235 }
238236
239237 /**
240- * @param mixed $bid_type
238+ * @param mixed $bid_strategy
241239 */
242- public function setBidType ( $ bid_type )
240+ public function setBidStrategy ( $ bidStrategy )
243241 {
244- $ this ->bid_type = $ bid_type ;
242+ $ this ->bid_strategy = $ bidStrategy ;
245243 }
246244
247245 /**
@@ -252,14 +250,6 @@ public function getAutomaticallySelectdBid()
252250 return $ this ->automatically_select_bid ;
253251 }
254252
255- /**
256- * @param mixed $automatically_select_bid
257- */
258- public function setAutomaticallySelectBid ($ automatically_select_bid )
259- {
260- $ this ->automatically_select_bid = $ automatically_select_bid ;
261- }
262-
263253 /**
264254 * @return mixed
265255 */
@@ -407,49 +397,33 @@ public function setPrimaryWebEventTag($primary_web_event_tag)
407397 /**
408398 * @return mixed
409399 */
410- public function getOptimization ()
400+ public function getPayBy ()
411401 {
412- return $ this ->optimization ;
402+ return $ this ->pay_by ;
413403 }
414404
415405 /**
416- * @param mixed $optimization
406+ * @param mixed $pay_by
417407 */
418- public function setOptimization ( $ optimization )
408+ public function setPayBy ( $ pay_by )
419409 {
420- $ this ->optimization = $ optimization ;
410+ $ this ->pay_by = $ pay_by ;
421411 }
422412
423413 /**
424414 * @return mixed
425415 */
426- public function getBidUnit ()
416+ public function getGoal ()
427417 {
428- return $ this ->bid_unit ;
418+ return $ this ->goal ;
429419 }
430420
431421 /**
432- * @param mixed $bid_unit
422+ * @param mixed $goal
433423 */
434- public function setBidUnit ( $ bid_unit )
424+ public function setGoal ( $ goal )
435425 {
436- $ this ->bid_unit = $ bid_unit ;
437- }
438-
439- /**
440- * @return mixed
441- */
442- public function getChargeBy ()
443- {
444- return $ this ->charge_by ;
445- }
446-
447- /**
448- * @param mixed $charge_by
449- */
450- public function setChargeBy ($ charge_by )
451- {
452- $ this ->charge_by = $ charge_by ;
426+ $ this ->goal = $ goal ;
453427 }
454428
455429 /**
@@ -516,6 +490,14 @@ public function getAutomaticallySelectBid()
516490 return $ this ->automatically_select_bid ;
517491 }
518492
493+ /**
494+ * @param mixed $automatically_select_bid
495+ */
496+ public function setAutomaticallySelectBid ($ automatically_select_bid )
497+ {
498+ $ this ->automatically_select_bid = $ automatically_select_bid ;
499+ }
500+
519501 /**
520502 * @return mixed
521503 */
0 commit comments