<<

NAME

Koha::Statistic - Koha Statistic Object class

API

Class methods

new

    my $record = Koha::Statistic->new( $params );

    C<$params> is an hashref whose expected keys are:
    branch             : transaction branch
    type               : transaction type
    itemnumber         : itemnumber
    borrowernumber     : borrowernumber
    categorycode       : patron category
    amount             : transaction amount (legacy parameter name)
    value              : transaction amount
    other              : sipmode
    itemtype           : itemtype
    ccode              : collection code
    interface          : the context this action was taken in

    The type key is mandatory, see @Koha::Statistic::allowed_account_types or
    @Koha::Statistic::allowed_circulation_types.
    Some keys are mandatory, depending on type. See @mandatory_accounts_keys
    or @mandatory_circulation_keys.

    The method throws an exception when given bad data, otherwise returns a
    Koha::Statistic object, which is not yet stored.

store

    $statistic->store;

    This call includes pseudonymization if enabled.

item

    my $item = $statistic->item;

    Return the item associated to this statistic.

pseudonymize

my $pseudonymized_stat = $statistic->pseudonymize;

Generate a pesudonymized version of the statistic.

Internal methods

_type

<<