Files
cgrates/engine
ionutboangiu 49f6c5982e Add reference value functionality to *transfer_balance action
The *transfer_balance action can now use a reference value to ensure
the destination balance reaches a specified amount. If the destination
balance exceeds the reference value, the excess is transferred back
to the source balance. If the destination balance is below the
reference value, the required amount is transferred from the source
balance to the destination balance to reach the specified reference
value. An error is returned if the transfer cannot achieve the
specified reference value.

Used by specifying DestinationReferenceValue inside ExtraParameters.

Other *transfer_balance changes:
- used json tags when unmarshaling ExtraParameters in order to be
able to shorten the names of the fields
- lock the destination account only if it's different from the
source account. It is still passed to the Guard function but
without a lock key and with 0 timeout.
- if the transfer happens within the same account, update the
account and execute its ActionTriggers only once.
- moved transfer units validation after retrieving/creating the
destination balance

*cdrlog action has been updated to create cdrs for reference
*transfer_balance actions, although improvements are needed and
the functionality is not completely tested.

APIerSv1.TransferBalance has been updated to take into account the
ReferenceValue parameter.

Added new *transfer_balance action unit tests to account for the
new changes.

Added integration tests (incomplete for now, but functionality
has been tested manually).
2024-06-13 13:56:40 +02:00
..
2024-06-06 13:17:59 +02:00
2024-06-10 18:52:59 +02:00
2024-04-12 13:13:17 +02:00
2021-09-28 12:17:04 +02:00
2021-09-28 12:17:04 +02:00
2023-02-16 11:28:36 +01:00
2023-05-31 10:23:12 +02:00
2024-06-06 13:17:59 +02:00
2024-06-06 13:17:59 +02:00
2021-09-28 12:17:04 +02:00
2024-01-15 16:17:02 +01:00
2023-05-31 10:23:12 +02:00
2023-05-31 10:23:12 +02:00
2023-05-31 10:23:12 +02:00
2023-05-31 10:23:12 +02:00
2023-05-31 10:23:12 +02:00
2023-10-26 15:52:06 +02:00
2024-06-06 13:17:59 +02:00
2023-08-28 12:22:33 +02:00
2021-05-26 20:08:15 +02:00
2023-05-31 10:23:12 +02:00
2023-05-31 10:23:12 +02:00
2023-05-31 10:23:12 +02:00
2022-11-16 11:54:41 +01:00
2024-04-16 21:10:13 +02:00
2024-04-12 13:13:17 +02:00
2023-05-31 10:23:12 +02:00
2024-04-16 21:10:13 +02:00
2022-11-08 10:48:56 +01:00
2023-05-31 10:23:12 +02:00
2024-06-10 18:52:59 +02:00
2024-04-08 13:14:02 +02:00
2021-10-21 14:30:20 +03:00
2024-04-12 13:13:17 +02:00