@@ -43,6 +43,9 @@ class AttributionData implements ArrayAccess {
4343 private $ attribution_model ;
4444 private $ attr_window ;
4545 private $ attribution_value ;
46+ private $ attribution_source ;
47+ private $ touchpoint_type ;
48+ private $ touchpoint_ts ;
4649
4750 protected static $ param_types = array (
4851 'scope ' => 'string ' ,
@@ -54,6 +57,9 @@ class AttributionData implements ArrayAccess {
5457 'attribution_model ' => 'FacebookAds\Object\ServerSide\AttributionModel ' ,
5558 'attr_window ' => 'int ' ,
5659 'attribution_value ' => 'float ' ,
60+ 'attribution_source ' => 'string ' ,
61+ 'touchpoint_type ' => 'string ' ,
62+ 'touchpoint_ts ' => 'int ' ,
5763 );
5864
5965 protected static $ attributeMap = array (
@@ -66,6 +72,9 @@ class AttributionData implements ArrayAccess {
6672 'attribution_model ' => 'attribution_model ' ,
6773 'attr_window ' => 'attr_window ' ,
6874 'attribution_value ' => 'attribution_value ' ,
75+ 'attribution_source ' => 'attribution_source ' ,
76+ 'touchpoint_type ' => 'touchpoint_type ' ,
77+ 'touchpoint_ts ' => 'touchpoint_ts ' ,
6978 );
7079
7180 protected static $ setters = array (
@@ -78,6 +87,9 @@ class AttributionData implements ArrayAccess {
7887 'attribution_model ' => 'setAttributionModel ' ,
7988 'attr_window ' => 'setAttrWindow ' ,
8089 'attribution_value ' => 'setAttributionValue ' ,
90+ 'attribution_source ' => 'setAttributionSource ' ,
91+ 'touchpoint_type ' => 'setTouchpointType ' ,
92+ 'touchpoint_ts ' => 'setTouchpointTs ' ,
8193 );
8294
8395 protected static $ getters = array (
@@ -90,6 +102,9 @@ class AttributionData implements ArrayAccess {
90102 'attribution_model ' => 'getAttributionModel ' ,
91103 'attr_window ' => 'getAttrWindow ' ,
92104 'attribution_value ' => 'getAttributionValue ' ,
105+ 'attribution_source ' => 'getAttributionSource ' ,
106+ 'touchpoint_type ' => 'getTouchpointType ' ,
107+ 'touchpoint_ts ' => 'getTouchpointTs ' ,
93108 );
94109
95110 protected $ container = array ();
@@ -104,6 +119,9 @@ public function __construct(?array $data = null) {
104119 $ this ->container ['attribution_model ' ] = isset ($ data ['attribution_model ' ]) ? $ data ['attribution_model ' ] : null ;
105120 $ this ->container ['attr_window ' ] = isset ($ data ['attr_window ' ]) ? $ data ['attr_window ' ] : null ;
106121 $ this ->container ['attribution_value ' ] = isset ($ data ['attribution_value ' ]) ? $ data ['attribution_value ' ] : null ;
122+ $ this ->container ['attribution_source ' ] = isset ($ data ['attribution_source ' ]) ? $ data ['attribution_source ' ] : null ;
123+ $ this ->container ['touchpoint_type ' ] = isset ($ data ['touchpoint_type ' ]) ? $ data ['touchpoint_type ' ] : null ;
124+ $ this ->container ['touchpoint_ts ' ] = isset ($ data ['touchpoint_ts ' ]) ? $ data ['touchpoint_ts ' ] : null ;
107125 }
108126
109127 public static function paramTypes () {
@@ -230,6 +248,39 @@ public function setAttributionValue($attribution_value) {
230248 return $ this ;
231249 }
232250
251+ /**
252+ * Sets attribution_source
253+ * @param string $attribution_source The attribution source to differentiate the source of the data, e.g. whether this is from AMM or Custom Attribution or any other sources.
254+ * @return $this
255+ */
256+ public function setAttributionSource ($ attribution_source ) {
257+ $ this ->container ['attribution_source ' ] = $ attribution_source ;
258+
259+ return $ this ;
260+ }
261+
262+ /**
263+ * Sets touchpoint_type
264+ * @param string $touchpoint_type The engagement type that caused the original credited conversion.
265+ * @return $this
266+ */
267+ public function setTouchpointType ($ touchpoint_type ) {
268+ $ this ->container ['touchpoint_type ' ] = $ touchpoint_type ;
269+
270+ return $ this ;
271+ }
272+
273+ /**
274+ * Sets touchpoint_ts
275+ * @param int $touchpoint_ts The time when the touchpoint event occurred with the ad that the install was credited to.
276+ * @return $this
277+ */
278+ public function setTouchpointTs ($ touchpoint_ts ) {
279+ $ this ->container ['touchpoint_ts ' ] = $ touchpoint_ts ;
280+
281+ return $ this ;
282+ }
283+
233284 /**
234285 * Gets touchpoint type.
235286 * @return string
@@ -302,6 +353,30 @@ public function getAttributionValue() {
302353 return $ this ->container ['attribution_value ' ];
303354 }
304355
356+ /**
357+ * Gets attribution source.
358+ * @return string
359+ */
360+ public function getAttributionSource () {
361+ return $ this ->container ['attribution_source ' ];
362+ }
363+
364+ /**
365+ * Gets touchpoint type.
366+ * @return string
367+ */
368+ public function getTouchpointType () {
369+ return $ this ->container ['touchpoint_type ' ];
370+ }
371+
372+ /**
373+ * Gets touchpoint timestamp.
374+ * @return int
375+ */
376+ public function getTouchpointTs () {
377+ return $ this ->container ['touchpoint_ts ' ];
378+ }
379+
305380 /**
306381 * Returns true if offset exists. False otherwise.
307382 * @param integer $offset Offset
@@ -355,6 +430,9 @@ public function normalize() {
355430 $ normalized_payload ['attribution_model ' ] = $ this ->getAttributionModel ();
356431 $ normalized_payload ['attr_window ' ] = $ this ->getAttrWindow ();
357432 $ normalized_payload ['attribution_value ' ] = $ this ->getAttributionValue ();
433+ $ normalized_payload ['attribution_source ' ] = $ this ->getAttributionSource ();
434+ $ normalized_payload ['touchpoint_type ' ] = $ this ->getTouchpointType ();
435+ $ normalized_payload ['touchpoint_ts ' ] = $ this ->getTouchpointTs ();
358436 return $ normalized_payload ;
359437 }
360438
0 commit comments