Difference between revisions of "Freeside:3:Documentation:Developer/FS/svc Radius Mixin"
From Freeside
m (Edit via perl MediaWiki framework (1.13)) |
m (Edit via perl MediaWiki framework (1.13)) |
||
(One intermediate revision by the same user not shown) | |||
Line 5: | Line 5: | ||
; radius_groups METHOD | ; radius_groups METHOD | ||
:Returns a list of RADIUS groups for this service (see [[Freeside:3:Documentation:Developer/FS/radius usergroup|FS::radius_usergroup]]). METHOD is the field to return, and can be any method on [[Freeside:3:Documentation:Developer/FS/radius group|FS::radius_group]]. Useful values for METHOD include 'groupnum', 'groupname', and 'long_description'. Defaults to 'groupname' for historical reasons. | :Returns a list of RADIUS groups for this service (see [[Freeside:3:Documentation:Developer/FS/radius usergroup|FS::radius_usergroup]]). METHOD is the field to return, and can be any method on [[Freeside:3:Documentation:Developer/FS/radius group|FS::radius_group]]. Useful values for METHOD include 'groupnum', 'groupname', and 'long_description'. Defaults to 'groupname' for historical reasons. | ||
+ | ; seconds_since_sqlradacct TIMESTAMP_START TIMESTAMP_END | ||
+ | :Returns the numbers of seconds this account has been online between TIMESTAMP_START (inclusive) and TIMESTAMP_END (exclusive), according to an external SQL radacct table, specified via sqlradius export. Sessions which started in the specified range but are still open are counted from session start to the end of the range (unless they are over 1 day old, in which case they are presumed missing their stop record and not counted). Also, sessions which end in the range but started earlier are counted from the start of the range to session end. Finally, sessions which start before the range but end after are counted for the entire range. | ||
+ | |||
+ | :TIMESTAMP_START and TIMESTAMP_END are specified as UNIX timestamps; see [[perlfunc#time|"time" in perlfunc]]. Also see [[Freeside:3:Documentation:Developer/Time/Local|Time::Local]] and [[Freeside:3:Documentation:Developer/Date/Parse|Date::Parse]] for conversion functions. | ||
+ | ; attribute_since_sqlradacct TIMESTAMP_START TIMESTAMP_END ATTRIBUTE | ||
+ | :For this service, returns the sum of the given attribute for sessions ending between TIMESTAMP_START (inclusive) and TIMESTAMP_END (exclusive). | ||
+ | |||
+ | :TIMESTAMP_START and TIMESTAMP_END are specified as UNIX timestamps; see [[perlfunc#time|"time" in perlfunc]]. Also see [[Freeside:3:Documentation:Developer/Time/Local|Time::Local]] and [[Freeside:3:Documentation:Developer/Date/Parse|Date::Parse]] for conversion functions. | ||
+ | ; attribute_last_sqlradacct ATTRIBUTE | ||
+ | :For this service, returns the most recent value of the given attribute. | ||
+ | ; get_session_history TIMESTAMP_START TIMESTAMP_END | ||
+ | :Returns an array of hash references of this customers login history for the given time range. (document this better) |
Latest revision as of 05:42, 10 February 2015
NAME
FS::svc_Radius_Mixin - partial base class for services with RADIUS groups
METHODS
- radius_groups METHOD
- Returns a list of RADIUS groups for this service (see FS::radius_usergroup). METHOD is the field to return, and can be any method on FS::radius_group. Useful values for METHOD include 'groupnum', 'groupname', and 'long_description'. Defaults to 'groupname' for historical reasons.
- seconds_since_sqlradacct TIMESTAMP_START TIMESTAMP_END
- Returns the numbers of seconds this account has been online between TIMESTAMP_START (inclusive) and TIMESTAMP_END (exclusive), according to an external SQL radacct table, specified via sqlradius export. Sessions which started in the specified range but are still open are counted from session start to the end of the range (unless they are over 1 day old, in which case they are presumed missing their stop record and not counted). Also, sessions which end in the range but started earlier are counted from the start of the range to session end. Finally, sessions which start before the range but end after are counted for the entire range.
- TIMESTAMP_START and TIMESTAMP_END are specified as UNIX timestamps; see "time" in perlfunc. Also see Time::Local and Date::Parse for conversion functions.
- attribute_since_sqlradacct TIMESTAMP_START TIMESTAMP_END ATTRIBUTE
- For this service, returns the sum of the given attribute for sessions ending between TIMESTAMP_START (inclusive) and TIMESTAMP_END (exclusive).
- TIMESTAMP_START and TIMESTAMP_END are specified as UNIX timestamps; see "time" in perlfunc. Also see Time::Local and Date::Parse for conversion functions.
- attribute_last_sqlradacct ATTRIBUTE
- For this service, returns the most recent value of the given attribute.
- get_session_history TIMESTAMP_START TIMESTAMP_END
- Returns an array of hash references of this customers login history for the given time range. (document this better)