mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
updated api
This commit is contained in:
@@ -45,7 +45,7 @@ RPC method providing the rating information from the storage.
|
||||
*/
|
||||
func (s *Storage) GetCost(cd timespans.CallDescriptor, reply *timespans.CallCost) (err error) {
|
||||
descriptor := &cd
|
||||
descriptor.StorageGetter = s.sg
|
||||
descriptor.SetStorageGetter(s.sg)
|
||||
r, e := descriptor.GetCost()
|
||||
*reply, err = *r, e
|
||||
return err
|
||||
@@ -53,7 +53,7 @@ func (s *Storage) GetCost(cd timespans.CallDescriptor, reply *timespans.CallCost
|
||||
|
||||
func (s *Storage) DebitCents(cd timespans.CallDescriptor, reply *float64) (err error) {
|
||||
descriptor := &cd
|
||||
descriptor.StorageGetter = s.sg
|
||||
descriptor.SetStorageGetter(s.sg)
|
||||
r, e := descriptor.DebitCents()
|
||||
*reply, err = r, e
|
||||
return err
|
||||
@@ -61,7 +61,7 @@ func (s *Storage) DebitCents(cd timespans.CallDescriptor, reply *float64) (err e
|
||||
|
||||
func (s *Storage) DebitSMS(cd timespans.CallDescriptor, reply *float64) (err error) {
|
||||
descriptor := &cd
|
||||
descriptor.StorageGetter = s.sg
|
||||
descriptor.SetStorageGetter(s.sg)
|
||||
r, e := descriptor.DebitSMS()
|
||||
*reply, err = r, e
|
||||
return err
|
||||
@@ -69,7 +69,7 @@ func (s *Storage) DebitSMS(cd timespans.CallDescriptor, reply *float64) (err err
|
||||
|
||||
func (s *Storage) DebitSeconds(cd timespans.CallDescriptor, reply *float64) (err error) {
|
||||
descriptor := &cd
|
||||
descriptor.StorageGetter = s.sg
|
||||
descriptor.SetStorageGetter(s.sg)
|
||||
e := descriptor.DebitSeconds()
|
||||
*reply, err = 0.0, e
|
||||
return err
|
||||
@@ -77,7 +77,7 @@ func (s *Storage) DebitSeconds(cd timespans.CallDescriptor, reply *float64) (err
|
||||
|
||||
func (s *Storage) GetMaxSessionTime(cd timespans.CallDescriptor, reply *float64) (err error) {
|
||||
descriptor := &cd
|
||||
descriptor.StorageGetter = s.sg
|
||||
descriptor.SetStorageGetter(s.sg)
|
||||
r, e := descriptor.GetMaxSessionTime()
|
||||
*reply, err = r, e
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user