How to get rule id with respect to customer group id

class CouponCode extends \Magento\Framework\View\Element\Template { protected $_customerSession; protected $_customerGroupCollection; public function __construct( \Magento\Customer\Model\Session $customerSession, \Magento\Customer\Model\Group $customerGroupCollection, \Magento\Framework\View\Element\Template\Context $context) { $this->_customerSession = $customerSession; $this->_customerGroupCollection = $customerGroupCollection; parent::__construct($context); } public function getCouponCodes() { $currentGroupId = $this->_customerSession->getCustomer()->getGroupId(); //Get customer group Id , you have already this so directly get name $collection = $this->_customerGroupCollection->load($currentGroupId); return $collection->getCustomerGroupCode();//Get group name }