protected function getList($limit = null, $offset = null)
    {
        $params = [
            'limit' => $limit,
            'offset' => $offset
        ];

        $response = $this->client->fetch(
            $this->uri,
            $params
        );

        $subAccounts = [];

        foreach ($response->getContent()['objects'] as $subAccount) {
            $newSubAccount = new SubAccount(
                $this->client,
                $subAccount,
                $this->pathParams['authId'],
                $subAccount['auth_id']);

            array_push($subAccounts, $newSubAccount);
        }

        return new SubAccountList(
            $this->client,
            $response->getContent()['meta'],
            $subAccounts);
    }
protected function getList($limit = null, $offset = null)
    {
        $params = [
            'limit' => $limit,
            'offset' => $offset
        ];

        $response = $this->client->fetch(
            $this->uri,
            $params
        );

        $subAccounts = [];

        foreach ($response->getContent()['objects'] as $subAccount) {
            $newSubAccount = new SubAccount(
                $this->client,
                $subAccount,
                $this->pathParams['authId'],
                $subAccount['auth_id']);

            array_push($subAccounts, $newSubAccount);
        }

        return new SubAccountList(
            $this->client,
            $response->getContent()['meta'],
            $subAccounts);
    }
protected function getList ( $ limit = null , $ offset = null ) { $ params = [ 'limit' => $ limit , 'offset' => $ offset ] ; $ response = $ this -> client -> fetch ( $ this -> uri , $ params ) ; $ subAccounts = [ ] ; foreach ( $ response -> getContent ( ) [ 'objects' ] as $ subAccount ) { $ newSubAccount = new SubAccount ( $ this -> client , $ subAccount , $ this -> pathParams [ 'authId' ] , $ subAccount [ 'auth_id' ] ) ; array_push ( $ subAccounts , $ newSubAccount ) ; } return new SubAccountList ( $ this -> client , $ response -> getContent ( ) [ 'meta' ] , $ subAccounts ) ; }
You can get details of all subaccounts associated with your main
Plivo account. We return a list of all subaccounts.

@param integer|null $limit Used to display the number of results per
page. The maximum number of results that can be fetched is 20.
@param integer|null $offset Denotes the number of value items by which
the results should be offset. Eg:- If the result contains a 1000 values
and limit is set to 10 and offset is set to 705, then values 706 through
715 are displayed in the results. This parameter is also used for
pagination of the results.
@return SubAccountList
You can get details of all subaccounts associated with your main Plivo account . We return a list of all subaccounts .