The BalanceCollection object is used to return data through a gateway module to display balance information on the Transactions List page in the WHMCS Admin area.

class BalanceCollection extends Collection

Methods summary

Return Type Method Name Description
static BalanceCollection factoryFromItems(BalanceInterface $balanceArray) The recommended method for creating a BalanceCollection object that should be returned via the custom gateway module.
BalanceCollection addBalance(BalanceInterface $balance) Add a single BalanceInterface object to an existing BalanceCollection.
static BalanceCollection factoryFromArray(array $balances) Make a BalanceCollection object from an array of data.

Details

static BalanceCollection factoryFromItems (BalanceInterface $balanceArray)

The recommended method for creating a BalanceCollection object that should be returned via the custom gateway module.

Parameters

BalanceInterface $balanceArray An array of BalanceInterface objects

Return Value

BalanceCollection

BalanceCollection addBalance (BalanceInterface $balance)

Add a single BalanceInterface object to an existing BalanceCollection.

Parameters

BalanceInterface $balance A single BalanceInterface object

Return Value

BalanceCollection

static BalanceCollection factoryFromArray (array $balances)

Make a BalanceCollection object from an array of data.

Parameters

array $balances An array of balances made from a BalanceInterface object.

Return Value

BalanceCollection