Skip to content

Commit 92cf42c

Browse files
committed
Updated function addUserStatisticRaw
1 parent 35c5f35 commit 92cf42c

File tree

1 file changed

+19
-8
lines changed

1 file changed

+19
-8
lines changed

src/Users/UserStatistics.php

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,23 +60,20 @@ public function addStatisticRaw($typeCode,$typeDesc,$categoryCode,$categoryDesc,
6060
{
6161
# Create the new statistic object
6262
$stat_obj = (object) [
63-
'statistic_category' => [(object) [
63+
'statistic_category' => (object) [
6464
'value' => $categoryCode,
6565
'desc' => $categoryDesc,
66-
]],
67-
'category_type' => [(object) [
66+
],
67+
'category_type' => (object) [
6868
'value' => $typeCode,
6969
'desc' => $typeDesc,
70-
]],
70+
],
7171
'statistic_note' => $note,
7272
'segment_type' => $segment_type,
7373
];
7474

75-
76-
//* TODO HERE *//
77-
7875
# Add the object to the user
79-
$this->data->user_statistic[] = $stat_obj;
76+
$this->data[] = $stat_obj;
8077

8178
/* Not Sure this is quite right or needed. */
8279
return Statistic::make($this->client,$stat_obj);
@@ -107,6 +104,20 @@ public function addStatistic($typeCode,$categoryCode)
107104
/* Seems to be an issue with # of categoryCodes that can be pulled at once (max:10) */
108105
/* But performing via curl returns all (???). */
109106
/* May need to open a case to allow resumption on pulling code tables regarding 'limit' and 'offset'? */
107+
108+
#
109+
# These functions for CodeTables need defined.
110+
#
111+
#$typeDesc = $this->conf->CodeTables->getDesc('UserStatisticalTypes',$typeCode);
112+
#$categoryDesc = $this->conf->CodeTables->getDesc('UserStatCagegories',$categoryCode);
113+
#
114+
# These are temporary.
115+
$segmentType = 'External'; # Just for now.
116+
$note = ''; # Just for now.
117+
118+
$ret = $this->addStatisticRaw($typeCode,$typeDesc,$categoryCode,$categoryDesc,$note,$segmentType);
119+
120+
return($ret);
110121
}
111122

112123
/**

0 commit comments

Comments
 (0)