This class stores the unique id, name and description of the tariff system used to determine the attributes tariff class and tariff period required to rate a call.
Definition at line 85 of file tariffsystem.h.
typedef Id<TariffSystem> OSB_LIB::TariffSystem::Oid |
Default constructor with optional object id.
bool OSB_LIB::TariffSystem::getTariffInfo | ( | Cdr & | cdr, | |
UsedService & | us, | |||
const TsVersion & | tsVs | |||
) |
Determine the tariff information for a used service.
cdr | CDR to process, it | |
us | Used service to process. | |
tsVs | Tariff system version that is valid for us. |
OsbException | if an error occurs. |
bool OSB_LIB::TariffSystem::insert | ( | const OSB_DB::Session & | session | ) | [private] |
Insert a tariff system version into database.
A new object is inserted. All attribute of the object has been set except object id. The object id will only be set by the function if the insertion is successful.
session | Database session. |
OsbException | for the following errors:
|
const Oid& OSB_LIB::TariffSystem::oid | ( | ) | const |
Get unique id of tariff system.
void OSB_LIB::TariffSystem::rate | ( | Cdr & | cdr | ) |
Rate a call details record.
This function will rate all used services from the Cdr. At the end, the rate will be placed in the cdr.
cdr | Call details record that provides other information. |
const AuthenType OSB_LIB::TariffSystem::rate | ( | Cdr & | cdr, | |
const Money & | money | |||
) |
Rate a used service.
This function will rate a used service passed in. It also gathers other required information from the Cdr passed in. At the end, the rate will be placed in the cdr.
cdr | Call details record that provides other information. | |
money | Available credit. |
bool OSB_LIB::TariffSystem::read | ( | const OSB_DB::Session & | session | ) |
Read a tariff system version from database.
The object id is used to gather other info from database and then populate the object's data members.
session | Database session. |
bool OSB_LIB::TariffSystem::remove | ( | const OSB_DB::Session & | session | ) | [private] |
Remove a tariff system version from database.
After the function call, oid of this object will be unset to indicate that there is no such entry anymore in the database.
session | Database session. |
OsbException | for the following errors:
|
bool OSB_LIB::TariffSystem::update | ( | const OSB_DB::Session & | session | ) | [private] |
Update a tariff system version in the database.
Old entry in the database identified by the object id will be replaced with the new data from this object.
session | Database session. |
OsbException | for the following errors:
|
friend class OSB_DB::TariffSystemGw [friend] |
Allow create function at the gateway to assign unique id to newly created tariff system objects.
Definition at line 90 of file tariffsystem.h.
friend class TariffCatalogue [friend] |
Allow tariff catalogue to call private member functions.
Definition at line 93 of file tariffsystem.h.
Oid OSB_LIB::TariffSystem::oid_ [private] |