PHPAPI-5 : Implement pagination support {nb}
Code adjustments

Signed-off-by: Saloni Dhall <saloni.dhall@kayako.com>