Difference between revisions of "Freeside:3:Documentation:Developer/FS/svc Radius Mixin"

From Freeside
Jump to: navigation, search
m (Edit via perl MediaWiki framework (1.13))
 
m (Edit via perl MediaWiki framework (1.13))
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
 +
:Returns the sum of the given attribute for all accounts (see [[Freeside:3:Documentation:Developer/FS/svc acct|FS::svc_acct]]) in this package 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.
 +
; 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)

Revision as of 13:40, 27 June 2014

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
Returns the sum of the given attribute for all accounts (see FS::svc_acct) in this package 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.
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)