Class · extends Collection
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.
public static function factoryFromItems(BalanceInterface ...$balanceArray): selfThe recommended method for creating a BalanceCollection object that should be returned via the custom gateway module.
Returns static
public function addBalance(BalanceInterface $balance): selfAdd a single BalanceInterface object to an existing BalanceCollection.
Parameters
| Type | Name | Description |
|---|---|---|
BalanceInterface | $balance | A single BalanceInterface object |
Returns $this
public static function factoryFromArray(array $balances): selfMake a BalanceCollection object from an array of data.
Parameters
| Type | Name | Description |
|---|---|---|
array | $balances | An array of balances made from a BalanceInterface object. |
Returns static