Charging API
This module defines the Charging API. This API may be used to provision user accounts and thereafter manage the user account objects. The API provides CRUD functionality to manage charging account information.
The Charging API exposes the following data models to the consumer:
Charging Accounts and Balances
The CCS does NOT delete Charging Accounts or Balances from the database if requested by API calls. Instead these objects are marked for deletion and not further visible by API consumers. An internal housekeeping process will finally delete these objects from the database.
The balance object consists of integer units and different identification
parameters that defines the validity of the units. The Parameter
ValidityTime defines the absolute duration of the balance. The ValidFrom
date will be set to the date of provisioning the balance. ValidTill
describes the end of validity of the Balance.
Example of a Balance object:
The InitialBalanceId, CDF and IMEI parameters are always optional.
Also note that a TariffId refers to a tariff which is responsible for
semantics of session initialization in TPOSS PCS and CCS. Please refer to the
TISP Operations Manual for a more detailed description of the tariffs.
Methods
Charging.Account.Create
Registers a new charging account with the given account information.
Following parameters could be passed:
Example of request:
Example of response:
In a case of error following error codes could be returned:
-31801- Duplicate account An account with the given Account-Id already exists-31802- Tariff not found There is no registered tariff with the givenTariffId-31803- Validity range invalid Valid-From, Valid-Till date range is invalid
Charging.Account.Read
Returns the object information for the charging account object associated with
the given ChargingAccountId. Returns an error if no associated charging
account object can be found.
Following parameters could be passed:
Example of request:
Example of response:
If a balance was provisioned with IMEI or/and CDF and account was provisioned
with tariff options, the response will also contain it:
In a case of a charging account does not exists - -31804 error code will be returned.
Charging.Account.Delete
Deletes all account information associated with a charging account object. Returns an error if no account can be found.
Following parameters could be passed:
Example of request:
Example of response:
In a case of a charging account does not exists - -31804 error code will be returned.
Charging.Account.Update
Updates the account information for a charging account object. Returns an error if no associated account cannot be found or an update fails.
Following parameters could be passed:
Example of request:
Example of response:
In a case of error following error codes could be returned:
-31802- The requested tariff is not provisioned.-31803- Valid-From, Valid-Till date range is invalid.-31804- There is no charging account with the given Account Id.
Charging.Balance.Add
Add a balance object to a charging account. If ValidityTime is present then
ValidFrom and ValidTill are calculated based on this value and provision
time. If ValidFrom and ValidTill is present then ValidityTime is
calculated based on these values. If all three parameters are present at the
same time or none of the three parameters are given then an error message will
be returned.
Following parameters could be passed:
Example of request:
Example of response:
In a case of error following error codes could be returned:
-31803- Either all three validity time parameters are present or none at all-31804- There is no charging account with the given Account Id-31805- A balance with the given BalanceId already exists
Charging.Balance.VolumeUpgrade
The method can be used to extend the allowed volume in the parent balance of a
charging account. The parent balance will be found using the parameters
ChargingAccountId, IMSI and CarrierGroupId. The parent balance will
be referenced by the BalanceId attribute.
Following parameters could be passed:
Example of request:
Example of response:
In a case of error following error codes could be returned:
-31804- There is no charging account with the given Account Id-31805- A balance with the given BalanceId already exists-31807- There is no balance existing that can be used for add the volume to it
Charging.Balance.Delete
Marks the balance object associated with the given id as candidate for delete. Returns an error if no balance object can be found.
Following parameters could be passed:
Example of request:
Example of response:
In a case of error following error code could be returned:
-31806- There is no balance object with the given BalanceId
Charging.CarrierGroup.Import
This Method Imports a complete list of carrier groups with the related carriers. The source data derived from a JSON structure with all defined CarrierGroups and Carriers. This import methos do a diff with this source data compared with the existing destination CarrierGroup and Carrier data in CCS. The result of this diff will be applied to the destination. As a result the CarrierGroups and Carriers in CCS is a 1 by 1 mapping to the data from the source JSON from the original request.
For each Carrier from the provided source data within a CarrierGroup the following checks will be done during import:
- Carrier already exists with the identical values? → skip this record
- Carrier already exists with different values? → update the changed values for this Carrier
- Carrier does not exist? → insert the Carrier to this CarrierGroup
- Carrier exists in destination CarrierGroup, but not in provided source data? → Delete Carrier from the CarrierGroup
Following parameters could be passed:
Example of request:
Example of response: